From 92c80e238ec3c3ab3b2e65944d755ed7cdc6949d Mon Sep 17 00:00:00 2001 From: Cristi Cobzarenco Date: Wed, 23 Aug 2017 11:49:35 +0100 Subject: [PATCH] chore(gen): regenerate apis without leading slashes --- gen/adexchangebuyer1d3/src/lib.rs | 273 +- gen/adexchangebuyer1d4/src/lib.rs | 494 ++- gen/adexchangeseller2/src/lib.rs | 182 +- gen/admin1_directory/src/lib.rs | 1248 ++++++-- gen/admin1_reports/src/lib.rs | 65 +- gen/adsense1d4/src/lib.rs | 494 ++- gen/adsensehost4d1/src/lib.rs | 338 ++- gen/analytics3/src/lib.rs | 1109 +++++-- gen/androidenterprise1/src/lib.rs | 1001 +++++-- gen/androidpublisher2/src/lib.rs | 744 +++-- gen/appengine1/src/lib.rs | 273 +- gen/appengine1_beta4/src/lib.rs | 260 +- gen/appengine1_beta5/src/lib.rs | 260 +- gen/appsactivity1/src/lib.rs | 13 +- gen/appstate1/src/lib.rs | 65 +- gen/autoscaler1_beta2/src/lib.rs | 130 +- gen/bigquery2/src/lib.rs | 277 +- gen/blogger3/src/lib.rs | 429 ++- gen/books1/src/lib.rs | 624 +++- gen/calendar3/src/lib.rs | 481 ++- gen/classroom1/src/lib.rs | 455 ++- gen/cloudbilling1/src/lib.rs | 65 +- gen/clouddebugger2/src/lib.rs | 104 +- gen/cloudkms1_beta1/src/lib.rs | 312 +- gen/cloudlatencytest2/src/lib.rs | 26 +- gen/cloudmonitoring2_beta2/src/lib.rs | 78 +- gen/cloudresourcemanager1/src/lib.rs | 481 ++- gen/cloudresourcemanager1_beta1/src/lib.rs | 208 +- gen/clouduseraccountsvm_beta/src/lib.rs | 221 +- gen/container1/src/lib.rs | 260 +- gen/content2/src/lib.rs | 754 +++-- gen/content2_sandbox/src/lib.rs | 195 +- gen/coordinate1/src/lib.rs | 156 +- gen/dataproc1/src/lib.rs | 208 +- gen/deploymentmanager2/src/lib.rs | 234 +- gen/deploymentmanager2_beta2/src/lib.rs | 169 +- gen/dfareporting2d1/src/lib.rs | 2513 ++++++++++++---- gen/dfareporting2d2/src/lib.rs | 2513 ++++++++++++---- gen/dfareporting2d3/src/lib.rs | 2500 ++++++++++++---- gen/dfareporting2d4/src/lib.rs | 2500 ++++++++++++---- gen/dfareporting2d5/src/lib.rs | 2552 ++++++++++++---- gen/dfareporting2d6/src/lib.rs | 2630 ++++++++++++---- gen/dfareporting2d7/src/lib.rs | 2656 +++++++++++++---- gen/dns1/src/lib.rs | 117 +- gen/doubleclickbidmanager1/src/lib.rs | 117 +- gen/doubleclicksearch2/src/lib.rs | 130 +- gen/drive2/src/lib.rs | 883 ++++-- gen/drive3/src/lib.rs | 515 +++- gen/firebasedynamiclinks1/src/lib.rs | 13 +- gen/fitness1/src/lib.rs | 169 +- gen/fusiontables2/src/lib.rs | 441 ++- gen/games1/src/lib.rs | 689 ++++- .../src/lib.rs | 173 +- gen/gamesmanagement1_management/src/lib.rs | 351 ++- gen/genomics1/src/lib.rs | 702 ++++- gen/gmail1/src/lib.rs | 830 ++++-- gen/groupsmigration1/src/lib.rs | 17 +- gen/groupssettings1/src/lib.rs | 39 +- gen/iam1/src/lib.rs | 195 +- gen/identitytoolkit3/src/lib.rs | 221 +- gen/licensing1/src/lib.rs | 91 +- gen/logging2/src/lib.rs | 468 ++- gen/logging2_beta1/src/lib.rs | 247 +- gen/manager1_beta2/src/lib.rs | 104 +- gen/manufacturers1/src/lib.rs | 26 +- gen/mirror1/src/lib.rs | 311 +- gen/ml1_beta1/src/lib.rs | 247 +- gen/monitoring3/src/lib.rs | 195 +- gen/people1/src/lib.rs | 39 +- gen/playmoviespartner1/src/lib.rs | 78 +- gen/plus1/src/lib.rs | 117 +- gen/plusdomains1/src/lib.rs | 264 +- gen/prediction1d6/src/lib.rs | 104 +- gen/proximitybeacon1_beta1/src/lib.rs | 208 +- gen/pubsub1/src/lib.rs | 299 +- gen/pubsub1_beta2/src/lib.rs | 260 +- gen/replicapool1_beta2/src/lib.rs | 156 +- gen/replicapoolupdater1_beta1/src/lib.rs | 130 +- gen/reseller1_sandbox/src/lib.rs | 182 +- gen/resourceviews1_beta2/src/lib.rs | 143 +- gen/serviceregistryalpha/src/lib.rs | 104 +- gen/siteverification1/src/lib.rs | 91 +- gen/sqladmin1_beta4/src/lib.rs | 520 +++- gen/storage1/src/lib.rs | 602 +++- gen/storagetransfer1/src/lib.rs | 143 +- gen/surveys2/src/lib.rs | 143 +- gen/tagmanager1/src/lib.rs | 650 +++- gen/taskqueue1_beta2/src/lib.rs | 104 +- gen/tasks1/src/lib.rs | 182 +- gen/urlshortener1/src/lib.rs | 39 +- gen/webmasters3/src/lib.rs | 169 +- gen/youtube3/src/lib.rs | 960 ++++-- gen/youtubeanalytics1/src/lib.rs | 104 +- gen/youtubereporting1/src/lib.rs | 104 +- 94 files changed, 33600 insertions(+), 10136 deletions(-) diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index 325064d60f..872001e2e5 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -2067,13 +2067,20 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BillingInfoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingInfoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2270,13 +2277,20 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BillingInfoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingInfoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2473,13 +2487,20 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectDealListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectDealListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2709,13 +2730,20 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectDealGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectDealGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2988,13 +3016,20 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3267,13 +3302,20 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3515,13 +3557,20 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3749,13 +3798,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4018,13 +4074,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4266,13 +4329,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4533,13 +4603,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4800,13 +4877,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5003,13 +5087,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5239,13 +5330,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5502,13 +5600,20 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PerformanceReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PerformanceReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5739,13 +5844,20 @@ impl<'a, C, A> PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6018,13 +6130,20 @@ impl<'a, C, A> PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6266,13 +6385,20 @@ impl<'a, C, A> PretargetingConfigGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6533,13 +6659,20 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6769,13 +6902,20 @@ impl<'a, C, A> PretargetingConfigListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7048,13 +7188,20 @@ impl<'a, C, A> PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/adexchangebuyer1d4/src/lib.rs b/gen/adexchangebuyer1d4/src/lib.rs index 3ebae60ffa..08af6fb555 100644 --- a/gen/adexchangebuyer1d4/src/lib.rs +++ b/gen/adexchangebuyer1d4/src/lib.rs @@ -3959,13 +3959,20 @@ impl<'a, C, A> PubprofileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PubprofileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PubprofileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4195,13 +4202,20 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BillingInfoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingInfoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4398,13 +4412,20 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BillingInfoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingInfoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4665,13 +4686,20 @@ impl<'a, C, A> MarketplacedealDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacedealDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacedealDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4932,13 +4960,20 @@ impl<'a, C, A> MarketplacedealInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacedealInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacedealInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5199,13 +5234,20 @@ impl<'a, C, A> MarketplacedealUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacedealUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacedealUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5447,13 +5489,20 @@ impl<'a, C, A> MarketplacedealListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacedealListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacedealListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5703,13 +5752,20 @@ impl<'a, C, A> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplaceprivateauctionUpdateproposalCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5918,13 +5974,20 @@ impl<'a, C, A> ProposalSearchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProposalSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6152,13 +6215,20 @@ impl<'a, C, A> ProposalInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProposalInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6443,13 +6513,20 @@ impl<'a, C, A> ProposalUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProposalUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6668,13 +6745,20 @@ impl<'a, C, A> ProposalSetupcompleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProposalSetupcompleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalSetupcompleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6959,13 +7043,20 @@ impl<'a, C, A> ProposalPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProposalPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7195,13 +7286,20 @@ impl<'a, C, A> ProposalGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProposalGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProposalGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7474,13 +7572,20 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7722,13 +7827,20 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8001,13 +8113,20 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BudgetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BudgetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8264,13 +8383,20 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PerformanceReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PerformanceReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8479,13 +8605,20 @@ impl<'a, C, A> ProductSearchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8715,13 +8848,20 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8963,13 +9103,20 @@ impl<'a, C, A> MarketplacenoteListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacenoteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacenoteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9230,13 +9377,20 @@ impl<'a, C, A> MarketplacenoteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MarketplacenoteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MarketplacenoteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9509,13 +9663,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9712,13 +9873,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9948,13 +10116,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10227,13 +10402,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10508,13 +10690,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10757,13 +10946,20 @@ impl<'a, C, A> CreativeRemoveDealCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeRemoveDealCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeRemoveDealCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11006,13 +11202,20 @@ impl<'a, C, A> CreativeAddDealCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeAddDealCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAddDealCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11254,13 +11457,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11488,13 +11698,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11736,13 +11953,20 @@ impl<'a, C, A> CreativeListDealCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListDealCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListDealCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12003,13 +12227,20 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12239,13 +12470,20 @@ impl<'a, C, A> PretargetingConfigListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12518,13 +12756,20 @@ impl<'a, C, A> PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12797,13 +13042,20 @@ impl<'a, C, A> PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13034,13 +13286,20 @@ impl<'a, C, A> PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13282,13 +13541,20 @@ impl<'a, C, A> PretargetingConfigGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PretargetingConfigGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PretargetingConfigGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/adexchangeseller2/src/lib.rs b/gen/adexchangeseller2/src/lib.rs index aa81cfc62c..e1494ffc1e 100644 --- a/gen/adexchangeseller2/src/lib.rs +++ b/gen/adexchangeseller2/src/lib.rs @@ -1451,13 +1451,20 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportSavedGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportSavedGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1687,13 +1694,20 @@ impl<'a, C, A> AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountMetadataMetricListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountMetadataMetricListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2064,13 +2078,20 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2336,13 +2357,20 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUrlchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUrlchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2596,13 +2624,20 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportSavedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportSavedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2844,13 +2879,20 @@ impl<'a, C, A> AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPreferreddealGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPreferreddealGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3104,13 +3146,20 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3340,13 +3389,20 @@ impl<'a, C, A> AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountMetadataDimensionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountMetadataDimensionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3600,13 +3656,20 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustomchannelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustomchannelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3872,13 +3935,20 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4099,13 +4169,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4347,13 +4424,20 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAlertListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAlertListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4583,13 +4667,20 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPreferreddealListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPreferreddealListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4819,13 +4910,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 5c00288331..13f186ebbb 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -5224,13 +5224,20 @@ impl<'a, C, A> VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VerificationCodeGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VerificationCodeGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5449,13 +5456,20 @@ impl<'a, C, A> VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VerificationCodeInvalidateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VerificationCodeInvalidateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5685,13 +5699,20 @@ impl<'a, C, A> VerificationCodeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VerificationCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VerificationCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5952,13 +5973,20 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6188,13 +6216,20 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6455,13 +6490,20 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6715,13 +6757,20 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6982,13 +7031,20 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7266,13 +7322,20 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7508,13 +7571,20 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7761,13 +7831,20 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8045,13 +8122,20 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrgunitPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrgunitPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8312,13 +8396,20 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8591,13 +8682,20 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8870,13 +8968,20 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9142,13 +9247,20 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9390,13 +9502,20 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9627,13 +9746,20 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MemberDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MemberDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9906,13 +10032,20 @@ impl<'a, C, A> RoleUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10154,13 +10287,20 @@ impl<'a, C, A> RoleGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10391,13 +10531,20 @@ impl<'a, C, A> RoleDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10670,13 +10817,20 @@ impl<'a, C, A> RolePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10937,13 +11091,20 @@ impl<'a, C, A> RoleInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11197,13 +11358,20 @@ impl<'a, C, A> RoleListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11469,13 +11637,20 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11748,13 +11923,20 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> NotificationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11985,13 +12167,20 @@ impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> NotificationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12233,13 +12422,20 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12512,13 +12708,20 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12748,13 +12951,20 @@ impl<'a, C, A> PrivilegeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PrivilegeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PrivilegeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12971,13 +13181,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13231,13 +13448,20 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobiledeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobiledeviceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13539,13 +13763,20 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobiledeviceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobiledeviceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13776,13 +14007,20 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MobiledeviceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobiledeviceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14044,13 +14282,20 @@ impl<'a, C, A> MobiledeviceActionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MobiledeviceActionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobiledeviceActionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14292,13 +14537,20 @@ impl<'a, C, A> TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TokenGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TokenGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14528,13 +14780,20 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TokenListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TokenListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14765,13 +15024,20 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TokenDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TokenDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15032,13 +15298,20 @@ impl<'a, C, A> RoleAssignmentInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RoleAssignmentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleAssignmentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15280,13 +15553,20 @@ impl<'a, C, A> RoleAssignmentGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoleAssignmentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleAssignmentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15517,13 +15797,20 @@ impl<'a, C, A> RoleAssignmentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RoleAssignmentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleAssignmentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15801,13 +16088,20 @@ impl<'a, C, A> RoleAssignmentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RoleAssignmentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleAssignmentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16109,13 +16403,20 @@ impl<'a, C, A> ChromeosdeviceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChromeosdeviceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChromeosdeviceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16400,13 +16701,20 @@ impl<'a, C, A> ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChromeosdevicePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChromeosdevicePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16691,13 +16999,20 @@ impl<'a, C, A> ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChromeosdeviceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChromeosdeviceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16951,13 +17266,20 @@ impl<'a, C, A> ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChromeosdeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChromeosdeviceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17219,13 +17541,20 @@ impl<'a, C, A> ChromeosdeviceActionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChromeosdeviceActionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChromeosdeviceActionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17444,13 +17773,20 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17707,13 +18043,20 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17974,13 +18317,20 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18208,13 +18558,20 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18475,13 +18832,20 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupAliaseInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupAliaseInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18711,13 +19075,20 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupAliaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupAliaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18947,13 +19318,20 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19214,13 +19592,20 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19451,13 +19836,20 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupAliaseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupAliaseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19699,13 +20091,20 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AspGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AspGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19936,13 +20335,20 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AspDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AspDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20172,13 +20578,20 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AspListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AspListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20408,13 +20821,20 @@ impl<'a, C, A> DomainListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20656,13 +21076,20 @@ impl<'a, C, A> DomainGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20923,13 +21350,20 @@ impl<'a, C, A> DomainInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21160,13 +21594,20 @@ impl<'a, C, A> DomainDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21427,13 +21868,20 @@ impl<'a, C, A> DomainAliaseInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DomainAliaseInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainAliaseInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21675,13 +22123,20 @@ impl<'a, C, A> DomainAliaseGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainAliaseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainAliaseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21923,13 +22378,20 @@ impl<'a, C, A> DomainAliaseListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DomainAliaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainAliaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22160,13 +22622,20 @@ impl<'a, C, A> DomainAliaseDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DomainAliaseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DomainAliaseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22408,13 +22877,20 @@ impl<'a, C, A> SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22687,13 +23163,20 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22923,13 +23406,20 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23202,13 +23692,20 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23439,13 +23936,20 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23706,13 +24210,20 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchemaInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchemaInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23966,13 +24477,20 @@ impl<'a, C, A> ResourceCalendarListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24214,13 +24732,20 @@ impl<'a, C, A> ResourceCalendarGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24481,13 +25006,20 @@ impl<'a, C, A> ResourceCalendarInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24760,13 +25292,20 @@ impl<'a, C, A> ResourceCalendarPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25039,13 +25578,20 @@ impl<'a, C, A> ResourceCalendarUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25276,13 +25822,20 @@ impl<'a, C, A> ResourceCalendarDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceCalendarDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceCalendarDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25532,13 +26085,20 @@ impl<'a, C, A> UserUndeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserUndeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserUndeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25757,13 +26317,20 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPhotoDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPhotoDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26024,13 +26591,20 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPhotoPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPhotoPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26258,13 +26832,20 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26537,13 +27118,20 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserAliaseWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserAliaseWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26804,13 +27392,20 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPhotoUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPhotoUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27182,13 +27777,20 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27449,13 +28051,20 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27685,13 +28294,20 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPhotoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPhotoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28032,13 +28648,20 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28304,13 +28927,20 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28571,13 +29201,20 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserAliaseInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserAliaseInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28819,13 +29456,20 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserAliaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserAliaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29075,13 +29719,20 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMakeAdminCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMakeAdminCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29342,13 +29993,20 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29579,13 +30237,20 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserAliaseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserAliaseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29804,13 +30469,20 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 02830e66d4..f4e144e994 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -1233,13 +1233,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1608,13 +1615,20 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1952,13 +1966,20 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2224,13 +2245,20 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomerUsageReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerUsageReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2532,13 +2560,20 @@ impl<'a, C, A> UserUsageReportGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserUsageReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserUsageReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/adsense1d4/src/lib.rs b/gen/adsense1d4/src/lib.rs index 9a718f8149..b60a9556b3 100644 --- a/gen/adsense1d4/src/lib.rs +++ b/gen/adsense1d4/src/lib.rs @@ -2635,13 +2635,20 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2907,13 +2914,20 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdunitCustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdunitCustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3155,13 +3169,20 @@ impl<'a, C, A> AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdunitGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdunitGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3427,13 +3448,20 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3675,13 +3703,20 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdunitGetAdCodeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdunitGetAdCodeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3902,13 +3937,20 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdclientListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdclientListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4127,13 +4169,20 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AlertDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AlertDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4342,13 +4391,20 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AlertListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AlertListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4569,13 +4625,20 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SavedadstyleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SavedadstyleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4805,13 +4868,20 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SavedadstyleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SavedadstyleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5032,13 +5102,20 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportSavedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportSavedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5415,13 +5492,20 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5687,13 +5771,20 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportSavedGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportSavedGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5924,13 +6015,20 @@ impl<'a, C, A> AccountAlertDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAlertDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAlertDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6172,13 +6270,20 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAlertListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAlertListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6456,13 +6561,20 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportSavedGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportSavedGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6683,13 +6795,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6919,13 +7038,20 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPaymentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPaymentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7167,13 +7293,20 @@ impl<'a, C, A> AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountSavedadstyleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountSavedadstyleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7427,13 +7560,20 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAdunitGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7687,13 +7827,20 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustomchannelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustomchannelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7983,13 +8130,20 @@ impl<'a, C, A> AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustomchannelAdunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustomchannelAdunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8243,13 +8397,20 @@ impl<'a, C, A> AccountReportSavedListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportSavedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportSavedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8515,13 +8676,20 @@ impl<'a, C, A> AccountUrlchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUrlchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUrlchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8799,13 +8967,20 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAdunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9200,13 +9375,20 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9460,13 +9642,20 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9732,13 +9921,20 @@ impl<'a, C, A> AccountCustomchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9992,13 +10188,20 @@ impl<'a, C, A> AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountSavedadstyleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountSavedadstyleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10252,13 +10455,20 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitGetAdCodeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitGetAdCodeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10536,13 +10746,20 @@ impl<'a, C, A> AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitCustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitCustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10784,13 +11001,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10987,13 +11211,20 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PaymentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PaymentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11190,13 +11421,20 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetadataDimensionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetadataDimensionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11393,13 +11631,20 @@ impl<'a, C, A> MetadataMetricListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetadataMetricListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetadataMetricListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11641,13 +11886,20 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomchannelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11901,13 +12153,20 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12185,13 +12444,20 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomchannelAdunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelAdunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/adsensehost4d1/src/lib.rs b/gen/adsensehost4d1/src/lib.rs index 18a7f4b56b..1443b2dfc9 100644 --- a/gen/adsensehost4d1/src/lib.rs +++ b/gen/adsensehost4d1/src/lib.rs @@ -1962,13 +1962,20 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlchannelInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlchannelInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2210,13 +2217,20 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlchannelDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlchannelDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2470,13 +2484,20 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2697,13 +2718,20 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdclientListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdclientListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2933,13 +2961,20 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdclientGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdclientGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3189,13 +3224,20 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AssociationsessionStartCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AssociationsessionStartCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3404,13 +3446,20 @@ impl<'a, C, A> AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AssociationsessionVerifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AssociationsessionVerifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3727,13 +3776,20 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4011,13 +4067,20 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAdunitListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4231,13 +4294,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4506,13 +4576,20 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitGetAdCodeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitGetAdCodeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4862,13 +4939,20 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5122,13 +5206,20 @@ impl<'a, C, A> AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5382,13 +5473,20 @@ impl<'a, C, A> AccountAdclientListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdclientListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5673,13 +5771,20 @@ impl<'a, C, A> AccountAdunitPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5921,13 +6026,20 @@ impl<'a, C, A> AccountAdclientGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdclientGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdclientGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6157,13 +6269,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6436,13 +6555,20 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6696,13 +6822,20 @@ impl<'a, C, A> AccountAdunitGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAdunitGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6975,13 +7108,20 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountAdunitUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAdunitUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7223,13 +7363,20 @@ impl<'a, C, A> CustomchannelGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomchannelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7471,13 +7618,20 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomchannelDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7738,13 +7892,20 @@ impl<'a, C, A> CustomchannelUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomchannelUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7998,13 +8159,20 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomchannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8277,13 +8445,20 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomchannelPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8544,13 +8719,20 @@ impl<'a, C, A> CustomchannelInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomchannelInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomchannelInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/analytics3/src/lib.rs b/gen/analytics3/src/lib.rs index cc6fdc08a5..e283a80d1d 100644 --- a/gen/analytics3/src/lib.rs +++ b/gen/analytics3/src/lib.rs @@ -5796,13 +5796,20 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6056,13 +6063,20 @@ impl<'a, C, A> ManagementProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6283,13 +6297,20 @@ impl<'a, C, A> ManagementAccountListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementAccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6586,13 +6607,20 @@ impl<'a, C, A> ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileFilterLinkPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6835,13 +6863,20 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7096,13 +7131,20 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileUserLinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileUserLinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7399,13 +7441,20 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileUserLinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileUserLinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7666,13 +7715,20 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7945,13 +8001,20 @@ impl<'a, C, A> ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementAccountUserLinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountUserLinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8217,13 +8280,20 @@ impl<'a, C, A> ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileFilterLinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8508,13 +8578,20 @@ impl<'a, C, A> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyUserLinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8799,13 +8876,20 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementUnsampledReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUnsampledReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9060,13 +9144,20 @@ impl<'a, C, A> ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9351,13 +9442,20 @@ impl<'a, C, A> ManagementRemarketingAudienceUpdateCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudienceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9611,13 +9709,20 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomMetricGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomMetricGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9883,13 +9988,20 @@ impl<'a, C, A> ManagementUploadGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementUploadGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUploadGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10186,13 +10298,20 @@ impl<'a, C, A> ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10458,13 +10577,20 @@ impl<'a, C, A> ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebpropertyUserLinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyUserLinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10761,13 +10887,20 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11033,13 +11166,20 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11336,13 +11476,20 @@ impl<'a, C, A> ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementCustomDimensionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDimensionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11608,13 +11755,20 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementUnsampledReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUnsampledReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11899,13 +12053,20 @@ impl<'a, C, A> ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileFilterLinkInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12178,13 +12339,20 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12269,9 +12437,9 @@ impl<'a, C, A> ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementUploadUploadDataCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUploadUploadDataCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12819,13 +12994,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13110,13 +13292,20 @@ impl<'a, C, A> ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13337,13 +13526,20 @@ impl<'a, C, A> ManagementSegmentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementSegmentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementSegmentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13586,13 +13782,20 @@ impl<'a, C, A> ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13889,13 +14092,20 @@ impl<'a, C, A> ManagementGoalPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementGoalPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementGoalPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14192,13 +14402,20 @@ impl<'a, C, A> ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomDimensionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDimensionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14452,13 +14669,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14736,13 +14960,20 @@ impl<'a, C, A> ManagementExperimentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15008,13 +15239,20 @@ impl<'a, C, A> ManagementProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15292,13 +15530,20 @@ impl<'a, C, A> ManagementGoalListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementGoalListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementGoalListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15583,13 +15828,20 @@ impl<'a, C, A> ManagementGoalInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementGoalInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementGoalInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15886,13 +16138,20 @@ impl<'a, C, A> ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomMetricPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomMetricPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16170,13 +16429,20 @@ impl<'a, C, A> ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileFilterLinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileFilterLinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16437,13 +16703,20 @@ impl<'a, C, A> ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementAccountUserLinkInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountUserLinkInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16716,13 +16989,20 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyUserLinkInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16995,13 +17275,20 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomMetricInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomMetricInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17256,13 +17543,20 @@ impl<'a, C, A> ManagementUnsampledReportDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementUnsampledReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUnsampledReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17547,13 +17841,20 @@ impl<'a, C, A> ManagementProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17795,13 +18096,20 @@ impl<'a, C, A> ManagementFilterGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18022,13 +18330,20 @@ impl<'a, C, A> ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementAccountSummaryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountSummaryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18294,13 +18609,20 @@ impl<'a, C, A> ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomDimensionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDimensionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18573,13 +18895,20 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18857,13 +19186,20 @@ impl<'a, C, A> ManagementUploadListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementUploadListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUploadListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19141,13 +19477,20 @@ impl<'a, C, A> ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileUserLinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileUserLinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19420,13 +19763,20 @@ impl<'a, C, A> ManagementRemarketingAudienceInsertCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudienceInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19669,13 +20019,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19949,13 +20306,20 @@ impl<'a, C, A> ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementUploadDeleteUploadDataCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUploadDeleteUploadDataCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20228,13 +20592,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20489,13 +20860,20 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20792,13 +21170,20 @@ impl<'a, C, A> ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementGoalUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementGoalUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21064,13 +21449,20 @@ impl<'a, C, A> ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomDataSourceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDataSourceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21336,13 +21728,20 @@ impl<'a, C, A> ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomMetricListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomMetricListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21620,13 +22019,20 @@ impl<'a, C, A> ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementUnsampledReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementUnsampledReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21868,13 +22274,20 @@ impl<'a, C, A> ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22159,13 +22572,20 @@ impl<'a, C, A> ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22419,13 +22839,20 @@ impl<'a, C, A> ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomDimensionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDimensionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22679,13 +23106,20 @@ impl<'a, C, A> ManagementRemarketingAudienceGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudienceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22928,13 +23362,20 @@ impl<'a, C, A> ManagementRemarketingAudienceDeleteCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23207,13 +23648,20 @@ impl<'a, C, A> ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23486,13 +23934,20 @@ impl<'a, C, A> ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementCustomDimensionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomDimensionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23723,13 +24178,20 @@ impl<'a, C, A> ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementAccountUserLinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountUserLinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24014,13 +24476,20 @@ impl<'a, C, A> ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementProfileUserLinkInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileUserLinkInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24317,13 +24786,20 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementExperimentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementExperimentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24577,13 +25053,20 @@ impl<'a, C, A> ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementWebpropertyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebpropertyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24868,13 +25351,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25140,13 +25630,20 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementGoalGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementGoalGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25443,13 +25940,20 @@ impl<'a, C, A> ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementCustomMetricUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementCustomMetricUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25734,13 +26238,20 @@ impl<'a, C, A> ManagementRemarketingAudiencePatchCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudiencePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudiencePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26025,13 +26536,20 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26304,13 +26822,20 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26564,13 +27089,20 @@ impl<'a, C, A> ManagementFilterListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26812,13 +27344,20 @@ impl<'a, C, A> ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementFilterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementFilterDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27091,13 +27630,20 @@ impl<'a, C, A> ManagementProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27351,13 +27897,20 @@ impl<'a, C, A> ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ManagementAccountUserLinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementAccountUserLinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27634,13 +28187,20 @@ impl<'a, C, A> ManagementRemarketingAudienceListCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagementRemarketingAudienceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagementRemarketingAudienceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27957,13 +28517,20 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DataMcfGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DataMcfGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28316,13 +28883,20 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DataGaGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DataGaGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28591,13 +29165,20 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DataRealtimeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DataRealtimeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28825,13 +29406,20 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProvisioningCreateAccountTicketCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProvisioningCreateAccountTicketCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29061,13 +29649,20 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetadataColumnListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetadataColumnListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/androidenterprise1/src/lib.rs b/gen/androidenterprise1/src/lib.rs index 9a1d44807d..3a36661766 100644 --- a/gen/androidenterprise1/src/lib.rs +++ b/gen/androidenterprise1/src/lib.rs @@ -4291,13 +4291,20 @@ impl<'a, C, A> StorelayoutpageListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4539,13 +4546,20 @@ impl<'a, C, A> StorelayoutpageGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4818,13 +4832,20 @@ impl<'a, C, A> StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5085,13 +5106,20 @@ impl<'a, C, A> StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5364,13 +5392,20 @@ impl<'a, C, A> StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5601,13 +5636,20 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutpageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutpageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5838,13 +5880,20 @@ impl<'a, C, A> UserRevokeTokenCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRevokeTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRevokeTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6119,13 +6168,20 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6367,13 +6423,20 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6604,13 +6667,20 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6854,13 +6924,20 @@ impl<'a, C, A> UserGenerateAuthenticationTokenCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGenerateAuthenticationTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGenerateAuthenticationTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7102,13 +7179,20 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7383,13 +7467,20 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7653,13 +7744,20 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7903,13 +8001,20 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGenerateTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGenerateTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8182,13 +8287,20 @@ impl<'a, C, A> UserSetAvailableProductSetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSetAvailableProductSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSetAvailableProductSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8430,13 +8542,20 @@ impl<'a, C, A> UserGetAvailableProductSetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserGetAvailableProductSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetAvailableProductSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8733,13 +8852,20 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstallPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstallPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9005,13 +9131,20 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstallGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstallGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9265,13 +9398,20 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstallListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstallListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9526,13 +9666,20 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstallDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstallDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9829,13 +9976,20 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstallUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstallUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10077,13 +10231,20 @@ impl<'a, C, A> GrouplicenseGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GrouplicenseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GrouplicenseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10313,13 +10474,20 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GrouplicenseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GrouplicenseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10574,13 +10742,20 @@ impl<'a, C, A> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10834,13 +11009,20 @@ impl<'a, C, A> ManagedconfigurationsfordeviceListCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsfordeviceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsfordeviceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11137,13 +11319,20 @@ impl<'a, C, A> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11409,13 +11598,20 @@ impl<'a, C, A> ManagedconfigurationsfordeviceGetCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsfordeviceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11712,13 +11908,20 @@ impl<'a, C, A> ManagedconfigurationsfordevicePatchCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsfordevicePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsfordevicePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12003,13 +12206,20 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeviceSetStateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeviceSetStateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12263,13 +12473,20 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeviceGetStateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeviceGetStateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12511,13 +12728,20 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeviceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeviceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12771,13 +12995,20 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeviceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeviceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12975,13 +13206,20 @@ impl<'a, C, A> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseAcknowledgeNotificationSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13200,13 +13438,20 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseUnenrollCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseUnenrollCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13446,13 +13691,20 @@ impl<'a, C, A> EnterpriseInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13682,13 +13934,20 @@ impl<'a, C, A> EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseSendTestPushNotificationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseSendTestPushNotificationCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13897,13 +14156,20 @@ impl<'a, C, A> EnterpriseListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14133,13 +14399,20 @@ impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseGetStoreLayoutCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14400,13 +14673,20 @@ impl<'a, C, A> EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseSetStoreLayoutCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseSetStoreLayoutCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14627,13 +14907,20 @@ impl<'a, C, A> EnterpriseCompleteSignupCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseCompleteSignupCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseCompleteSignupCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14849,13 +15136,20 @@ impl<'a, C, A> EnterprisePullNotificationSetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterprisePullNotificationSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterprisePullNotificationSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15095,13 +15389,20 @@ impl<'a, C, A> EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseEnrollCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseEnrollCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15331,13 +15632,20 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15585,13 +15893,20 @@ impl<'a, C, A> EnterpriseGetServiceAccountCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseGetServiceAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseGetServiceAccountCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15852,13 +16167,20 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseSetAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseSetAccountCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16077,13 +16399,20 @@ impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EnterpriseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16293,13 +16622,20 @@ impl<'a, C, A> EnterpriseGenerateSignupUrlCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseGenerateSignupUrlCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16560,13 +16896,20 @@ impl<'a, C, A> EnterpriseCreateWebTokenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EnterpriseCreateWebTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EnterpriseCreateWebTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16851,13 +17194,20 @@ impl<'a, C, A> StorelayoutclusterPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17100,13 +17450,20 @@ impl<'a, C, A> StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17379,13 +17736,20 @@ impl<'a, C, A> StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17627,13 +17991,20 @@ impl<'a, C, A> StorelayoutclusterListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17918,13 +18289,20 @@ impl<'a, C, A> StorelayoutclusterUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18178,13 +18556,20 @@ impl<'a, C, A> StorelayoutclusterGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StorelayoutclusterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StorelayoutclusterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18426,13 +18811,20 @@ impl<'a, C, A> ProductGetPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProductGetPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGetPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18663,13 +19055,20 @@ impl<'a, C, A> ProductUnapproveCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductUnapproveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductUnapproveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18925,13 +19324,20 @@ impl<'a, C, A> ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProductGenerateApprovalUrlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGenerateApprovalUrlCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19185,13 +19591,20 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19455,13 +19868,20 @@ impl<'a, C, A> ProductApproveCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductApproveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductApproveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19715,13 +20135,20 @@ impl<'a, C, A> ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGetAppRestrictionsSchemaCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20011,13 +20438,20 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20302,13 +20736,20 @@ impl<'a, C, A> ManagedconfigurationsforuserPatchCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsforuserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsforuserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20551,13 +20992,20 @@ impl<'a, C, A> ManagedconfigurationsforuserDeleteCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsforuserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsforuserDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20799,13 +21247,20 @@ impl<'a, C, A> ManagedconfigurationsforuserListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsforuserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsforuserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21090,13 +21545,20 @@ impl<'a, C, A> ManagedconfigurationsforuserUpdateCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsforuserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsforuserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21350,13 +21812,20 @@ impl<'a, C, A> ManagedconfigurationsforuserGetCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedconfigurationsforuserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedconfigurationsforuserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21598,13 +22067,20 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> GrouplicenseuserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GrouplicenseuserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21847,13 +22323,20 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntitlementDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntitlementDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22150,13 +22633,20 @@ impl<'a, C, A> EntitlementUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntitlementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntitlementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22410,13 +22900,20 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntitlementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntitlementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22658,13 +23155,20 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntitlementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntitlementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22961,13 +23465,20 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntitlementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntitlementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23230,13 +23741,20 @@ impl<'a, C, A> ServiceaccountkeyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ServiceaccountkeyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ServiceaccountkeyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23466,13 +23984,20 @@ impl<'a, C, A> ServiceaccountkeyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ServiceaccountkeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ServiceaccountkeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23703,13 +24228,20 @@ impl<'a, C, A> ServiceaccountkeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ServiceaccountkeyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ServiceaccountkeyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23951,13 +24483,20 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index 37bbc07f96..e717cd04e8 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -3645,13 +3645,20 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseSubscriptionRevokeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseSubscriptionRevokeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3905,13 +3912,20 @@ impl<'a, C, A> PurchaseProductGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseProductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4165,13 +4179,20 @@ impl<'a, C, A> PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseSubscriptionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseSubscriptionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4458,13 +4479,20 @@ impl<'a, C, A> PurchaseVoidedpurchaseListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseVoidedpurchaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseVoidedpurchaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4707,13 +4735,20 @@ impl<'a, C, A> PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseSubscriptionCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseSubscriptionCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4956,13 +4991,20 @@ impl<'a, C, A> PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseSubscriptionRefundCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseSubscriptionRefundCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5247,13 +5289,20 @@ impl<'a, C, A> PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PurchaseSubscriptionDeferCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PurchaseSubscriptionDeferCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5340,9 +5389,9 @@ impl<'a, C, A> EditDeobfuscationfileUploadCall<'a, C, A> where C: BorrowMut EditDeobfuscationfileUploadCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditDeobfuscationfileUploadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditDeobfuscationfileUploadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5720,9 +5776,9 @@ impl<'a, C, A> EditImageUploadCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "multipart") + (self.hub._root_url.clone() + "upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "resumable") } else { unreachable!() }; @@ -6007,13 +6063,20 @@ impl<'a, C, A> EditImageUploadCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditImageUploadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditImageUploadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6309,13 +6372,20 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditExpansionfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditExpansionfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6557,13 +6627,20 @@ impl<'a, C, A> EditDetailGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditDetailGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditDetailGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6794,13 +6871,20 @@ impl<'a, C, A> EditListingDeleteallCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditListingDeleteallCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingDeleteallCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7073,13 +7157,20 @@ impl<'a, C, A> EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApkAddexternallyhostedCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApkAddexternallyhostedCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7322,13 +7413,20 @@ impl<'a, C, A> EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApklistingDeleteallCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingDeleteallCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7601,13 +7699,20 @@ impl<'a, C, A> EditDetailUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditDetailUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditDetailUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7861,13 +7966,20 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTrackGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTrackGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8163,13 +8275,20 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditExpansionfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditExpansionfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8434,13 +8553,20 @@ impl<'a, C, A> EditImageListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditImageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditImageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8725,13 +8851,20 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTrackUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTrackUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9016,13 +9149,20 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditListingPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9264,13 +9404,20 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9536,13 +9683,20 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditImageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditImageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9623,9 +9777,9 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "multipart") + (self.hub._root_url.clone() + "upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "resumable") + (self.hub._root_url.clone() + "resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "resumable") } else { unreachable!() }; @@ -9891,13 +10045,20 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditApkUploadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApkUploadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10194,13 +10355,20 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApklistingUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10440,13 +10608,20 @@ impl<'a, C, A> EditApkListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditApkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10743,13 +10918,20 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApklistingPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11003,13 +11185,20 @@ impl<'a, C, A> EditListingGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditListingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11264,13 +11453,20 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApklistingDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11521,13 +11717,20 @@ impl<'a, C, A> EditTesterGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTesterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTesterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11758,13 +11961,20 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11851,9 +12061,9 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditExpansionfileUploadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditExpansionfileUploadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12405,13 +12622,20 @@ impl<'a, C, A> EditInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12653,13 +12877,20 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditListingListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12941,13 +13172,20 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTesterPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTesterPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13189,13 +13427,20 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditCommitCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditCommitCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13437,13 +13682,20 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTrackListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTrackListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13685,13 +13937,20 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditValidateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditValidateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13976,13 +14235,20 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditListingUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14247,13 +14513,20 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditExpansionfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditExpansionfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14518,13 +14791,20 @@ impl<'a, C, A> EditImageDeleteallCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditImageDeleteallCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditImageDeleteallCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14797,13 +15077,20 @@ impl<'a, C, A> EditDetailPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditDetailPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditDetailPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15088,13 +15375,20 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTrackPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTrackPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15337,13 +15631,20 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditListingDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditListingDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15609,13 +15910,20 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditApklistingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15897,13 +16205,20 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EditTesterUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditTesterUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16157,13 +16472,20 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EditApklistingListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EditApklistingListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16435,13 +16757,20 @@ impl<'a, C, A> ReviewReplyCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReviewReplyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReviewReplyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16693,13 +17022,20 @@ impl<'a, C, A> ReviewGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReviewGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReviewGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16973,13 +17309,20 @@ impl<'a, C, A> ReviewListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReviewListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReviewListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17205,13 +17548,20 @@ impl<'a, C, A> InappproductBatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InappproductBatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductBatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17474,13 +17824,20 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InappproductListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17753,13 +18110,20 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InappproductInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17990,13 +18354,20 @@ impl<'a, C, A> InappproductDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InappproductDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18237,13 +18608,20 @@ impl<'a, C, A> InappproductGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InappproductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18528,13 +18906,20 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InappproductUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18819,13 +19204,20 @@ impl<'a, C, A> InappproductPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InappproductPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InappproductPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/appengine1/src/lib.rs b/gen/appengine1/src/lib.rs index 232191479b..7e13a2df9a 100644 --- a/gen/appengine1/src/lib.rs +++ b/gen/appengine1/src/lib.rs @@ -2213,13 +2213,20 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2498,13 +2505,20 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2771,13 +2785,20 @@ impl<'a, C, A> AppRepairCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppRepairCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppRepairCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3080,13 +3101,20 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceDebugCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceDebugCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3334,13 +3362,20 @@ impl<'a, C, A> AppServiceGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3621,13 +3656,20 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3899,13 +3941,20 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceVersionInstanceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4212,13 +4261,20 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4502,13 +4558,20 @@ impl<'a, C, A> AppServiceVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4756,13 +4819,20 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5022,13 +5092,20 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5300,13 +5377,20 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5578,13 +5662,20 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5856,13 +5947,20 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6122,13 +6220,20 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6376,13 +6481,20 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6685,13 +6797,20 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServicePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServicePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6927,13 +7046,20 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7181,13 +7307,20 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7423,13 +7556,20 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7701,13 +7841,20 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/appengine1_beta4/src/lib.rs b/gen/appengine1_beta4/src/lib.rs index 9486b7a173..3711749583 100644 --- a/gen/appengine1_beta4/src/lib.rs +++ b/gen/appengine1_beta4/src/lib.rs @@ -2131,13 +2131,20 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppModulePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModulePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2385,13 +2392,20 @@ impl<'a, C, A> AppModuleGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppModuleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2663,13 +2677,20 @@ impl<'a, C, A> AppModuleVersionInstanceGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionInstanceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionInstanceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2929,13 +2950,20 @@ impl<'a, C, A> AppModuleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppModuleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3171,13 +3199,20 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3461,13 +3496,20 @@ impl<'a, C, A> AppModuleVersionInstanceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionInstanceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionInstanceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3739,13 +3781,20 @@ impl<'a, C, A> AppModuleVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionInstanceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionInstanceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4048,13 +4097,20 @@ impl<'a, C, A> AppModuleVersionInstanceDebugCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionInstanceDebugCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionInstanceDebugCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4302,13 +4358,20 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4556,13 +4619,20 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppModuleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4843,13 +4913,20 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5097,13 +5174,20 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5351,13 +5435,20 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5629,13 +5720,20 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5942,13 +6040,20 @@ impl<'a, C, A> AppModuleVersionPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6220,13 +6325,20 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6486,13 +6598,20 @@ impl<'a, C, A> AppModuleVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6771,13 +6890,20 @@ impl<'a, C, A> AppModuleVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7049,13 +7175,20 @@ impl<'a, C, A> AppModuleVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7339,13 +7472,20 @@ impl<'a, C, A> AppModuleVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppModuleVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppModuleVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/appengine1_beta5/src/lib.rs b/gen/appengine1_beta5/src/lib.rs index 22ef50d0d8..4db5b43a11 100644 --- a/gen/appengine1_beta5/src/lib.rs +++ b/gen/appengine1_beta5/src/lib.rs @@ -2106,13 +2106,20 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2391,13 +2398,20 @@ impl<'a, C, A> AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2678,13 +2692,20 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2987,13 +3008,20 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceDebugCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceDebugCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3241,13 +3269,20 @@ impl<'a, C, A> AppServiceGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3519,13 +3554,20 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceVersionInstanceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3832,13 +3874,20 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4122,13 +4171,20 @@ impl<'a, C, A> AppServiceVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4376,13 +4432,20 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4642,13 +4705,20 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4920,13 +4990,20 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5198,13 +5275,20 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionInstanceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionInstanceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5476,13 +5560,20 @@ impl<'a, C, A> AppOperationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5742,13 +5833,20 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5996,13 +6094,20 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppLocationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppLocationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6305,13 +6410,20 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServicePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServicePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6559,13 +6671,20 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6813,13 +6932,20 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppServiceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7055,13 +7181,20 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7333,13 +7466,20 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AppServiceVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppServiceVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/appsactivity1/src/lib.rs b/gen/appsactivity1/src/lib.rs index 26cbdb0ba9..e2c489fc65 100644 --- a/gen/appsactivity1/src/lib.rs +++ b/gen/appsactivity1/src/lib.rs @@ -951,13 +951,20 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index 5d1e059132..5d456f8e35 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -810,13 +810,20 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StateDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StateDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1046,13 +1053,20 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1294,13 +1308,20 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StateClearCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StateClearCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1509,13 +1530,20 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1788,13 +1816,20 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StateUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StateUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/autoscaler1_beta2/src/lib.rs b/gen/autoscaler1_beta2/src/lib.rs index 89070aa873..6ec70e8700 100644 --- a/gen/autoscaler1_beta2/src/lib.rs +++ b/gen/autoscaler1_beta2/src/lib.rs @@ -1404,13 +1404,20 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1683,13 +1690,20 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1929,13 +1943,20 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneOperationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2186,13 +2207,20 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2467,13 +2495,20 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2758,13 +2793,20 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3049,13 +3091,20 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3309,13 +3358,20 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3588,13 +3644,20 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3848,13 +3911,20 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AutoscalerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AutoscalerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 79c003df46..56aacb8cbd 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -2931,13 +2931,20 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3210,13 +3217,20 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3482,13 +3496,20 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3731,13 +3752,20 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4003,13 +4031,20 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4294,13 +4329,20 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TablePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TablePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4573,13 +4615,20 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4821,13 +4870,20 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5105,13 +5161,20 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5384,13 +5447,20 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5633,13 +5703,20 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5900,13 +5977,20 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6148,13 +6232,20 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6415,13 +6506,20 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6711,13 +6809,20 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobGetQueryResultCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobGetQueryResultCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7010,13 +7115,20 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7258,13 +7370,20 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7352,9 +7471,9 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/bigquery/v2/projects/{projectId}/jobs", "multipart") + (self.hub._root_url.clone() + "upload/bigquery/v2/projects/{projectId}/jobs", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/bigquery/v2/projects/{projectId}/jobs", "resumable") + (self.hub._root_url.clone() + "resumable/upload/bigquery/v2/projects/{projectId}/jobs", "resumable") } else { unreachable!() }; @@ -7635,13 +7754,20 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7926,13 +8052,20 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TabledataInsertAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TabledataInsertAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8234,13 +8367,20 @@ impl<'a, C, A> TabledataListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TabledataListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TabledataListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8461,13 +8601,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/blogger3/src/lib.rs b/gen/blogger3/src/lib.rs index 192cb2ab7d..70f8dd7f42 100644 --- a/gen/blogger3/src/lib.rs +++ b/gen/blogger3/src/lib.rs @@ -2543,13 +2543,20 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageViewGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageViewGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2779,13 +2786,20 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3069,13 +3083,20 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BlogListByUserCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BlogListByUserCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3329,13 +3350,20 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BlogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BlogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3556,13 +3584,20 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BlogGetByUrlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BlogGetByUrlCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3895,13 +3930,20 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4167,13 +4209,20 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostGetByPathCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostGetByPathCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4463,13 +4512,20 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4766,13 +4822,20 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5026,13 +5089,20 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostPublishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostPublishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5263,13 +5333,20 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5511,13 +5588,20 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostRevertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostRevertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5783,13 +5867,20 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6122,13 +6213,20 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6481,13 +6579,20 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6753,13 +6858,20 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7013,13 +7125,20 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CommentRemoveContentCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentRemoveContentCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7323,13 +7442,20 @@ impl<'a, C, A> CommentListByBlogCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListByBlogCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListByBlogCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7583,13 +7709,20 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentMarkAsSpamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentMarkAsSpamCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7917,13 +8050,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8177,13 +8317,20 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentApproveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentApproveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8426,13 +8573,20 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8698,13 +8852,20 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostUserInfoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostUserInfoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9056,13 +9217,20 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostUserInfoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostUserInfoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9316,13 +9484,20 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BlogUserInfoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BlogUserInfoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9575,13 +9750,20 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9873,13 +10055,20 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10121,13 +10310,20 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageRevertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageRevertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10400,13 +10596,20 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10703,13 +10906,20 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10951,13 +11161,20 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PagePublishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PagePublishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11254,13 +11471,20 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11491,13 +11715,20 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index 2983717178..4ec82984de 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -4300,13 +4300,20 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LayerAnnotationDataGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerAnnotationDataGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4584,13 +4591,20 @@ impl<'a, C, A> LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LayerVolumeAnnotationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerVolumeAnnotationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4868,13 +4882,20 @@ impl<'a, C, A> LayerListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LayerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5140,13 +5161,20 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LayerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5544,13 +5572,20 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LayerVolumeAnnotationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerVolumeAnnotationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5927,13 +5962,20 @@ impl<'a, C, A> LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LayerAnnotationDataListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LayerAnnotationDataListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6178,13 +6220,20 @@ impl<'a, C, A> VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VolumeRecommendedRateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeRecommendedRateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6485,13 +6534,20 @@ impl<'a, C, A> VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VolumeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6778,13 +6834,20 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VolumeMybookListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeMybookListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7149,13 +7212,20 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VolumeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7430,13 +7500,20 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VolumeUseruploadedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeUseruploadedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7714,13 +7791,20 @@ impl<'a, C, A> VolumeAssociatedListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VolumeAssociatedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeAssociatedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7953,13 +8037,20 @@ impl<'a, C, A> VolumeRecommendedListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VolumeRecommendedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VolumeRecommendedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8168,13 +8259,20 @@ impl<'a, C, A> DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DictionaryListOfflineMetadataCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DictionaryListOfflineMetadataCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8388,13 +8486,20 @@ impl<'a, C, A> SeryGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SeryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SeryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8627,13 +8732,20 @@ impl<'a, C, A> SeryMembershipGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SeryMembershipGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SeryMembershipGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8923,13 +9035,20 @@ impl<'a, C, A> BookshelveVolumeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BookshelveVolumeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BookshelveVolumeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9171,13 +9290,20 @@ impl<'a, C, A> BookshelveListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BookshelveListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BookshelveListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9431,13 +9557,20 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BookshelveGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BookshelveGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9718,13 +9851,20 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PromoofferAcceptCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PromoofferAcceptCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9994,13 +10134,20 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PromoofferDismisCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PromoofferDismisCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10269,13 +10416,20 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PromoofferGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PromoofferGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10508,13 +10662,20 @@ impl<'a, C, A> PersonalizedstreamGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PersonalizedstreamGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PersonalizedstreamGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10723,13 +10884,20 @@ impl<'a, C, A> OnboardingListCategoryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OnboardingListCategoryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OnboardingListCategoryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10989,13 +11157,20 @@ impl<'a, C, A> OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OnboardingListCategoryVolumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OnboardingListCategoryVolumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11264,13 +11439,20 @@ impl<'a, C, A> MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MyconfigRequestAccesCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MyconfigRequestAccesCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11520,13 +11702,20 @@ impl<'a, C, A> MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MyconfigReleaseDownloadAccesCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MyconfigReleaseDownloadAccesCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11825,13 +12014,20 @@ impl<'a, C, A> MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MyconfigSyncVolumeLicenseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MyconfigSyncVolumeLicenseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12028,13 +12224,20 @@ impl<'a, C, A> MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MyconfigGetUserSettingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MyconfigGetUserSettingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12262,13 +12465,20 @@ impl<'a, C, A> MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MyconfigUpdateUserSettingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MyconfigUpdateUserSettingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12499,13 +12709,20 @@ impl<'a, C, A> MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveClearVolumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveClearVolumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12760,13 +12977,20 @@ impl<'a, C, A> MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveMoveVolumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13080,13 +13304,20 @@ impl<'a, C, A> MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveVolumeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveVolumeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13312,13 +13543,20 @@ impl<'a, C, A> MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryAnnotationSummaryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryAnnotationSummaryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13549,13 +13787,20 @@ impl<'a, C, A> MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryAnnotationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryAnnotationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13810,13 +14055,20 @@ impl<'a, C, A> MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveAddVolumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveAddVolumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14092,13 +14344,20 @@ impl<'a, C, A> MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryAnnotationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryAnnotationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14353,13 +14612,20 @@ impl<'a, C, A> MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveRemoveVolumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14679,13 +14945,20 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryAnnotationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryAnnotationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14958,13 +15231,20 @@ impl<'a, C, A> MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryAnnotationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryAnnotationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15255,13 +15535,20 @@ impl<'a, C, A> MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MylibraryReadingpositionSetPositionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryReadingpositionSetPositionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15503,13 +15790,20 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15718,13 +16012,20 @@ impl<'a, C, A> MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryBookshelveListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryBookshelveListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15978,13 +16279,20 @@ impl<'a, C, A> MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MylibraryReadingpositionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MylibraryReadingpositionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16217,13 +16525,20 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16467,13 +16782,20 @@ impl<'a, C, A> CloudloadingAddBookCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CloudloadingAddBookCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CloudloadingAddBookCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16701,13 +17023,20 @@ impl<'a, C, A> CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CloudloadingUpdateBookCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CloudloadingUpdateBookCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16905,13 +17234,20 @@ impl<'a, C, A> CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CloudloadingDeleteBookCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CloudloadingDeleteBookCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/calendar3/src/lib.rs b/gen/calendar3/src/lib.rs index 96a78905c6..3a456a4d82 100644 --- a/gen/calendar3/src/lib.rs +++ b/gen/calendar3/src/lib.rs @@ -2722,13 +2722,20 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FreebusyQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FreebusyQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2964,13 +2971,20 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SettingListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SettingListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3237,13 +3251,20 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SettingWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SettingWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3473,13 +3494,20 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SettingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SettingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3752,13 +3780,20 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CalendarListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3977,13 +4012,20 @@ impl<'a, C, A> CalendarListDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CalendarListDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4213,13 +4255,20 @@ impl<'a, C, A> CalendarListGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4492,13 +4541,20 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4738,13 +4794,20 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CalendarListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5017,13 +5080,20 @@ impl<'a, C, A> CalendarListPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5327,13 +5397,20 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarListWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarListWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5594,13 +5671,20 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5819,13 +5903,20 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6055,13 +6146,20 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6280,13 +6378,20 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarClearCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarClearCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6514,13 +6619,20 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6781,13 +6893,20 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CalendarUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CalendarUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7099,13 +7218,20 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7366,13 +7492,20 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7645,13 +7778,20 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7924,13 +8064,20 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8211,13 +8358,20 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8448,13 +8602,20 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8696,13 +8857,20 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AclGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AclGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8919,13 +9087,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9122,13 +9297,20 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColorGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColorGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9371,13 +9553,20 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9674,13 +9863,20 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9953,13 +10149,20 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventImportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10309,13 +10512,20 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventInstanceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventInstanceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10593,13 +10803,20 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11052,13 +11269,20 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11379,13 +11603,20 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11651,13 +11882,20 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventMoveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventMoveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11978,13 +12216,20 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12468,13 +12713,20 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12728,13 +12980,20 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventQuickAddCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventQuickAddCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/classroom1/src/lib.rs b/gen/classroom1/src/lib.rs index 5942251e49..4422c79e2d 100644 --- a/gen/classroom1/src/lib.rs +++ b/gen/classroom1/src/lib.rs @@ -3645,13 +3645,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3997,13 +4004,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4247,13 +4261,20 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4530,13 +4551,20 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4798,13 +4826,20 @@ impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseStudentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseStudentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5066,13 +5101,20 @@ impl<'a, C, A> CourseTeacherGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseTeacherGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseTeacherGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5386,13 +5428,20 @@ impl<'a, C, A> CourseCourseWorkListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5649,13 +5698,20 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5967,13 +6023,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6283,13 +6346,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> w /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6565,13 +6635,20 @@ impl<'a, C, A> CourseTeacherListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseTeacherListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseTeacherListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6885,13 +6962,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7168,13 +7252,20 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseAliaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseAliaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7460,13 +7551,20 @@ impl<'a, C, A> CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7759,13 +7857,20 @@ impl<'a, C, A> CourseListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8078,13 +8183,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> where C: B /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8363,13 +8475,20 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseAliaseCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseAliaseCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8666,13 +8785,20 @@ impl<'a, C, A> CourseStudentCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseStudentCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseStudentCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8932,13 +9058,20 @@ impl<'a, C, A> CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseAliaseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseAliaseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9202,13 +9335,20 @@ impl<'a, C, A> CourseCourseWorkDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9456,13 +9596,20 @@ impl<'a, C, A> CourseCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9738,13 +9885,20 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseStudentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseStudentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9988,13 +10142,20 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10321,13 +10482,20 @@ impl<'a, C, A> CourseCourseWorkPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseCourseWorkPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10631,13 +10799,20 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CoursePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CoursePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10899,13 +11074,20 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseStudentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseStudentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11169,13 +11351,20 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseTeacherDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseTeacherDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11458,13 +11647,20 @@ impl<'a, C, A> CourseTeacherCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CourseTeacherCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseTeacherCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11733,13 +11929,20 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CourseCourseWorkStudentSubmissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12516,13 +12719,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14160,13 +14370,20 @@ impl<'a, C, A> InvitationDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InvitationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InvitationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14411,13 +14628,20 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InvitationCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InvitationCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14690,13 +14914,20 @@ impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InvitationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InvitationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14938,13 +15169,20 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InvitationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InvitationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15193,13 +15431,20 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InvitationAcceptCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InvitationAcceptCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudbilling1/src/lib.rs b/gen/cloudbilling1/src/lib.rs index 068824b1ff..99ae586c36 100644 --- a/gen/cloudbilling1/src/lib.rs +++ b/gen/cloudbilling1/src/lib.rs @@ -944,13 +944,20 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BillingAccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1181,13 +1188,20 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1457,13 +1471,20 @@ impl<'a, C, A> BillingAccountProjectListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1707,13 +1728,20 @@ impl<'a, C, A> ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetBillingInfoCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetBillingInfoCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2015,13 +2043,20 @@ impl<'a, C, A> ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectUpdateBillingInfoCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectUpdateBillingInfoCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/clouddebugger2/src/lib.rs b/gen/clouddebugger2/src/lib.rs index 63ede39f1a..a8e25d5cd6 100644 --- a/gen/clouddebugger2/src/lib.rs +++ b/gen/clouddebugger2/src/lib.rs @@ -1742,13 +1742,20 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1991,13 +1998,20 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ControllerDebuggeeRegisterCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ControllerDebuggeeRegisterCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2276,13 +2290,20 @@ impl<'a, C, A> ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ControllerDebuggeeBreakpointListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ControllerDebuggeeBreakpointListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2543,13 +2564,20 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DebuggerDebuggeeBreakpointGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DebuggerDebuggeeBreakpointGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2810,13 +2838,20 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3057,13 +3092,20 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DebuggerDebuggeeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DebuggerDebuggeeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3343,13 +3385,20 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DebuggerDebuggeeBreakpointSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DebuggerDebuggeeBreakpointSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3665,13 +3714,20 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DebuggerDebuggeeBreakpointListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudkms1_beta1/src/lib.rs b/gen/cloudkms1_beta1/src/lib.rs index e0666f6207..67c2caec5e 100644 --- a/gen/cloudkms1_beta1/src/lib.rs +++ b/gen/cloudkms1_beta1/src/lib.rs @@ -2027,13 +2027,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2318,13 +2325,20 @@ impl<'a, C, A> ProjectLocationKeyRingCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectLocationKeyRingCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2593,13 +2607,20 @@ impl<'a, C, A> ProjectLocationKeyRingListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectLocationKeyRingListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2881,13 +2902,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionDestroyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3162,13 +3190,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyEncryptCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3408,13 +3443,20 @@ impl<'a, C, A> ProjectLocationKeyRingGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectLocationKeyRingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3655,13 +3697,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3937,13 +3986,20 @@ impl<'a, C, A> ProjectLocationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectLocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4221,13 +4277,20 @@ impl<'a, C, A> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4470,13 +4533,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> where C /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4747,13 +4817,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyUpdatePrimaryVersionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5037,13 +5114,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5315,13 +5399,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyDecryptCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5564,13 +5655,20 @@ impl<'a, C, A> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5843,13 +5941,20 @@ impl<'a, C, A> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6089,13 +6194,20 @@ impl<'a, C, A> ProjectLocationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectLocationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6373,13 +6485,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> wh /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6649,13 +6768,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6924,13 +7050,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7206,13 +7339,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7452,13 +7592,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7731,13 +7878,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> where C /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeySetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8014,13 +8168,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCryptoKeyVersionRestoreCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8307,13 +8468,20 @@ impl<'a, C, A> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> where C: Borr /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLocationKeyRingCryptoKeyCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudlatencytest2/src/lib.rs b/gen/cloudlatencytest2/src/lib.rs index c95a89157a..8ca4877e13 100644 --- a/gen/cloudlatencytest2/src/lib.rs +++ b/gen/cloudlatencytest2/src/lib.rs @@ -796,13 +796,20 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StatscollectionUpdateaggregatedstatCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StatscollectionUpdateaggregatedstatCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1030,13 +1037,20 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> StatscollectionUpdatestatCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StatscollectionUpdatestatCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudmonitoring2_beta2/src/lib.rs b/gen/cloudmonitoring2_beta2/src/lib.rs index f968ae2921..b53b782fb9 100644 --- a/gen/cloudmonitoring2_beta2/src/lib.rs +++ b/gen/cloudmonitoring2_beta2/src/lib.rs @@ -1447,13 +1447,20 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TimeseriesDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimeseriesDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1714,13 +1721,20 @@ impl<'a, C, A> TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimeseryWriteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimeseryWriteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2108,13 +2122,20 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimeseryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimeseryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2411,13 +2432,20 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetricDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetricDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2659,13 +2687,20 @@ impl<'a, C, A> MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetricDescriptorDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetricDescriptorDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2926,13 +2961,20 @@ impl<'a, C, A> MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetricDescriptorCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetricDescriptorCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudresourcemanager1/src/lib.rs b/gen/cloudresourcemanager1/src/lib.rs index 34d37ad924..23c96bc8f5 100644 --- a/gen/cloudresourcemanager1/src/lib.rs +++ b/gen/cloudresourcemanager1/src/lib.rs @@ -3118,13 +3118,20 @@ impl<'a, C, A> FolderGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderGetEffectiveOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3395,13 +3402,20 @@ impl<'a, C, A> FolderClearOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FolderClearOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderClearOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3672,13 +3686,20 @@ impl<'a, C, A> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderListAvailableOrgPolicyConstraintCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3954,13 +3975,20 @@ impl<'a, C, A> FolderGetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FolderGetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderGetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4235,13 +4263,20 @@ impl<'a, C, A> FolderSetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FolderSetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4512,13 +4547,20 @@ impl<'a, C, A> FolderListOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FolderListOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderListOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4789,13 +4831,20 @@ impl<'a, C, A> OrganizationClearOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationClearOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationClearOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5071,13 +5120,20 @@ impl<'a, C, A> OrganizationGetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationGetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5348,13 +5404,20 @@ impl<'a, C, A> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> where /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationListAvailableOrgPolicyConstraintCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5625,13 +5688,20 @@ impl<'a, C, A> OrganizationListOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationListOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationListOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5905,13 +5975,20 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6151,13 +6228,20 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrganizationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6430,13 +6514,20 @@ impl<'a, C, A> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetEffectiveOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6673,13 +6764,20 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6953,13 +7051,20 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7233,13 +7338,20 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7514,13 +7626,20 @@ impl<'a, C, A> OrganizationSetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7760,13 +7879,20 @@ impl<'a, C, A> LienCreateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LienCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LienCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8010,13 +8136,20 @@ impl<'a, C, A> LienDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LienDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LienDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8260,13 +8393,20 @@ impl<'a, C, A> LienListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LienListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LienListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8527,13 +8667,20 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8802,13 +8949,20 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9049,13 +9203,20 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9331,13 +9492,20 @@ impl<'a, C, A> ProjectGetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9612,13 +9780,20 @@ impl<'a, C, A> ProjectSetOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSetOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSetOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9889,13 +10064,20 @@ impl<'a, C, A> ProjectClearOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectClearOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectClearOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10170,13 +10352,20 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectUndeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectUndeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10447,13 +10636,20 @@ impl<'a, C, A> ProjectListOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectListOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10721,13 +10917,20 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10998,13 +11201,20 @@ impl<'a, C, A> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListAvailableOrgPolicyConstraintCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11245,13 +11455,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11519,13 +11736,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11830,13 +12054,20 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12108,13 +12339,20 @@ impl<'a, C, A> ProjectGetAncestryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetAncestryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetAncestryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12386,13 +12624,20 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12665,13 +12910,20 @@ impl<'a, C, A> ProjectGetEffectiveOrgPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetEffectiveOrgPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12913,13 +13165,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/cloudresourcemanager1_beta1/src/lib.rs b/gen/cloudresourcemanager1_beta1/src/lib.rs index ec3a909fc5..51facfd799 100644 --- a/gen/cloudresourcemanager1_beta1/src/lib.rs +++ b/gen/cloudresourcemanager1_beta1/src/lib.rs @@ -1765,13 +1765,20 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2045,13 +2052,20 @@ impl<'a, C, A> OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2325,13 +2339,20 @@ impl<'a, C, A> OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2584,13 +2605,20 @@ impl<'a, C, A> OrganizationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrganizationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2863,13 +2891,20 @@ impl<'a, C, A> OrganizationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3125,13 +3160,20 @@ impl<'a, C, A> OrganizationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrganizationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3399,13 +3441,20 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3680,13 +3729,20 @@ impl<'a, C, A> ProjectUndeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectUndeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectUndeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3939,13 +3995,20 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4249,13 +4312,20 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4496,13 +4566,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4774,13 +4851,20 @@ impl<'a, C, A> ProjectGetAncestryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetAncestryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetAncestryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5052,13 +5136,20 @@ impl<'a, C, A> ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5327,13 +5418,20 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5594,13 +5692,20 @@ impl<'a, C, A> ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5868,13 +5973,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/clouduseraccountsvm_beta/src/lib.rs b/gen/clouduseraccountsvm_beta/src/lib.rs index b8d52f8d8e..79306d81f2 100644 --- a/gen/clouduseraccountsvm_beta/src/lib.rs +++ b/gen/clouduseraccountsvm_beta/src/lib.rs @@ -1642,13 +1642,20 @@ impl<'a, C, A> GlobalAccountsOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> GlobalAccountsOperationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GlobalAccountsOperationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1938,13 +1945,20 @@ impl<'a, C, A> GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> GlobalAccountsOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GlobalAccountsOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2186,13 +2200,20 @@ impl<'a, C, A> GlobalAccountsOperationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> GlobalAccountsOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GlobalAccountsOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2465,13 +2486,20 @@ impl<'a, C, A> UserAddPublicKeyCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserAddPublicKeyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserAddPublicKeyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2761,13 +2789,20 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3028,13 +3063,20 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3276,13 +3318,20 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3536,13 +3585,20 @@ impl<'a, C, A> UserRemovePublicKeyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRemovePublicKeyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRemovePublicKeyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3784,13 +3840,20 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4032,13 +4095,20 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4280,13 +4350,20 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4559,13 +4636,20 @@ impl<'a, C, A> GroupAddMemberCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupAddMemberCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupAddMemberCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4826,13 +4910,20 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5122,13 +5213,20 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5401,13 +5499,20 @@ impl<'a, C, A> GroupRemoveMemberCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupRemoveMemberCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupRemoveMemberCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5721,13 +5826,20 @@ impl<'a, C, A> LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LinuxGetLinuxAccountViewCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LinuxGetLinuxAccountViewCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6005,13 +6117,20 @@ impl<'a, C, A> LinuxGetAuthorizedKeysViewCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LinuxGetAuthorizedKeysViewCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LinuxGetAuthorizedKeysViewCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/container1/src/lib.rs b/gen/container1/src/lib.rs index d94e54b573..c52ac51a33 100644 --- a/gen/container1/src/lib.rs +++ b/gen/container1/src/lib.rs @@ -2127,13 +2127,20 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2383,13 +2390,20 @@ impl<'a, C, A> ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneGetServerconfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneGetServerconfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2682,13 +2696,20 @@ impl<'a, C, A> ProjectZoneOperationCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneOperationCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneOperationCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2951,13 +2972,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3253,13 +3281,20 @@ impl<'a, C, A> ProjectZoneClusterSetMasterAuthCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterSetMasterAuthCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3530,13 +3565,20 @@ impl<'a, C, A> ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3830,13 +3872,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolCreateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterNodePoolCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4111,13 +4160,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterNodePoolGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4424,13 +4480,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolRollbackCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4724,13 +4787,20 @@ impl<'a, C, A> ProjectZoneClusterStartIpRotationCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterStartIpRotationCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5024,13 +5094,20 @@ impl<'a, C, A> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterCompleteIpRotationCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5336,13 +5413,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolSetManagementCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5636,13 +5720,20 @@ impl<'a, C, A> ProjectZoneClusterLegacyAbacCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterLegacyAbacCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5905,13 +5996,20 @@ impl<'a, C, A> ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6205,13 +6303,20 @@ impl<'a, C, A> ProjectZoneClusterResourceLabelCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterResourceLabelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterResourceLabelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6461,13 +6566,20 @@ impl<'a, C, A> ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6761,13 +6873,20 @@ impl<'a, C, A> ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7061,13 +7180,20 @@ impl<'a, C, A> ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7319,13 +7445,20 @@ impl<'a, C, A> ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectZoneClusterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7600,13 +7733,20 @@ impl<'a, C, A> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index feaa400363..78bc3ce61e 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -5981,13 +5981,20 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccounttaxCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccounttaxCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6272,13 +6279,20 @@ impl<'a, C, A> AccounttaxPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccounttaxPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccounttaxPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6532,13 +6546,20 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccounttaxListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccounttaxListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6823,13 +6844,20 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccounttaxUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccounttaxUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7071,13 +7099,20 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccounttaxGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccounttaxGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7362,13 +7397,20 @@ impl<'a, C, A> ShippingsettingPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ShippingsettingPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7598,13 +7640,20 @@ impl<'a, C, A> ShippingsettingGetsupportedcarrierCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ShippingsettingGetsupportedcarrierCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingGetsupportedcarrierCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7858,13 +7907,20 @@ impl<'a, C, A> ShippingsettingListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ShippingsettingListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8104,13 +8160,20 @@ impl<'a, C, A> ShippingsettingCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ShippingsettingCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8395,13 +8458,20 @@ impl<'a, C, A> ShippingsettingUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ShippingsettingUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8643,13 +8713,20 @@ impl<'a, C, A> ShippingsettingGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ShippingsettingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShippingsettingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8887,13 +8964,20 @@ impl<'a, C, A> DatafeedCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatafeedCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9133,13 +9217,20 @@ impl<'a, C, A> DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9422,13 +9513,20 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9669,13 +9767,20 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9947,13 +10052,20 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10207,13 +10319,20 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10496,13 +10615,20 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatafeedUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10744,13 +10870,20 @@ impl<'a, C, A> AccountstatuseGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountstatuseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountstatuseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10976,13 +11109,20 @@ impl<'a, C, A> AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountstatuseCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountstatuseCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11236,13 +11376,20 @@ impl<'a, C, A> AccountstatuseListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountstatuseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountstatuseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11527,13 +11674,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11730,13 +11884,20 @@ impl<'a, C, A> AccountAuthinfoCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAuthinfoCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAuthinfoCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12021,13 +12182,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12281,13 +12449,20 @@ impl<'a, C, A> AccountClaimwebsiteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountClaimwebsiteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountClaimwebsiteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12541,13 +12716,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12790,13 +12972,20 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13036,13 +13225,20 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13284,13 +13480,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13563,13 +13766,20 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13809,13 +14019,20 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InventoryCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14112,13 +14329,20 @@ impl<'a, C, A> InventorySetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventorySetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventorySetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14372,13 +14596,20 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductstatuseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductstatuseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14656,13 +14887,20 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProductstatuseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductstatuseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14902,13 +15140,20 @@ impl<'a, C, A> ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProductstatuseCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductstatuseCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15174,13 +15419,20 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15422,13 +15674,20 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15671,13 +15930,20 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15917,13 +16183,20 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProductCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16196,13 +16469,20 @@ impl<'a, C, A> ProductInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProductInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProductInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16442,13 +16722,20 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatafeedstatuseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedstatuseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16702,13 +16989,20 @@ impl<'a, C, A> DatafeedstatuseListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatafeedstatuseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedstatuseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16934,13 +17228,20 @@ impl<'a, C, A> DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatafeedstatuseCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatafeedstatuseCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17259,13 +17560,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17507,13 +17815,20 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderGettestordertemplateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGettestordertemplateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17755,13 +18070,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18034,13 +18356,20 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderRefundCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderRefundCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18313,13 +18642,20 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderAcknowledgeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderAcknowledgeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18592,13 +18928,20 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderUpdatemerchantorderidCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderUpdatemerchantorderidCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18840,13 +19183,20 @@ impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderGetbymerchantorderidCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetbymerchantorderidCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19107,13 +19457,20 @@ impl<'a, C, A> OrderCreatetestorderCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderCreatetestorderCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCreatetestorderCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19386,13 +19743,20 @@ impl<'a, C, A> OrderReturnlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderReturnlineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderReturnlineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19620,13 +19984,20 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19899,13 +20270,20 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderCancellineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCancellineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20178,13 +20556,20 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderShiplineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderShiplineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20457,13 +20842,20 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderUpdateshipmentCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderUpdateshipmentCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20705,13 +21097,20 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20984,13 +21383,20 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/content2_sandbox/src/lib.rs b/gen/content2_sandbox/src/lib.rs index 6ea4a32905..ccad7e6401 100644 --- a/gen/content2_sandbox/src/lib.rs +++ b/gen/content2_sandbox/src/lib.rs @@ -2420,13 +2420,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2745,13 +2752,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3024,13 +3038,20 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderUpdateshipmentCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderUpdateshipmentCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3272,13 +3293,20 @@ impl<'a, C, A> OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderAdvancetestorderCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3551,13 +3579,20 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderUpdatemerchantorderidCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderUpdatemerchantorderidCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3830,13 +3865,20 @@ impl<'a, C, A> OrderReturnlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderReturnlineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderReturnlineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4078,13 +4120,20 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderGettestordertemplateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGettestordertemplateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4345,13 +4394,20 @@ impl<'a, C, A> OrderCreatetestorderCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderCreatetestorderCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCreatetestorderCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4624,13 +4680,20 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderRefundCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderRefundCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4858,13 +4921,20 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderCustombatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCustombatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5137,13 +5207,20 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderCancellineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCancellineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5385,13 +5462,20 @@ impl<'a, C, A> OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrderGetbymerchantorderidCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetbymerchantorderidCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5664,13 +5748,20 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderAcknowledgeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderAcknowledgeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5943,13 +6034,20 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6222,13 +6320,20 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderShiplineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderShiplineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/coordinate1/src/lib.rs b/gen/coordinate1/src/lib.rs index e40cb73e50..3a25bfdc97 100644 --- a/gen/coordinate1/src/lib.rs +++ b/gen/coordinate1/src/lib.rs @@ -1582,13 +1582,20 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1984,13 +1991,20 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2386,13 +2400,20 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2670,13 +2691,20 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3048,13 +3076,20 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3375,13 +3410,20 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScheduleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScheduleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3702,13 +3744,20 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SchedulePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SchedulePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3950,13 +3999,20 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScheduleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScheduleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4186,13 +4242,20 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WorkerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WorkerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4470,13 +4533,20 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4709,13 +4779,20 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4945,13 +5022,20 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CustomFieldDefListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomFieldDefListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dataproc1/src/lib.rs b/gen/dataproc1/src/lib.rs index 36cba38b72..4ae21b3439 100644 --- a/gen/dataproc1/src/lib.rs +++ b/gen/dataproc1/src/lib.rs @@ -1853,13 +1853,20 @@ impl<'a, C, A> ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2143,13 +2150,20 @@ impl<'a, C, A> ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2457,13 +2471,20 @@ impl<'a, C, A> ProjectRegionJobListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2782,13 +2803,20 @@ impl<'a, C, A> ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3048,13 +3076,20 @@ impl<'a, C, A> ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3294,13 +3329,20 @@ impl<'a, C, A> ProjectRegionOperationCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionOperationCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionOperationCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3540,13 +3582,20 @@ impl<'a, C, A> ProjectRegionOperationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3806,13 +3855,20 @@ impl<'a, C, A> ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4103,13 +4159,20 @@ impl<'a, C, A> ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterDiagnoseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterDiagnoseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4388,13 +4451,20 @@ impl<'a, C, A> ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobSubmitCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobSubmitCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4673,13 +4743,20 @@ impl<'a, C, A> ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionClusterCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionClusterCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4939,13 +5016,20 @@ impl<'a, C, A> ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5185,13 +5269,20 @@ impl<'a, C, A> ProjectRegionOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionOperationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionOperationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5467,13 +5558,20 @@ impl<'a, C, A> ProjectRegionOperationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5776,13 +5874,20 @@ impl<'a, C, A> ProjectRegionJobPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6073,13 +6178,20 @@ impl<'a, C, A> ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectRegionJobCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectRegionJobCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/deploymentmanager2/src/lib.rs b/gen/deploymentmanager2/src/lib.rs index 91fd4ca3c9..9e5f866902 100644 --- a/gen/deploymentmanager2/src/lib.rs +++ b/gen/deploymentmanager2/src/lib.rs @@ -2180,13 +2180,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2476,13 +2483,20 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2784,13 +2798,20 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManifestListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManifestListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3044,13 +3065,20 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManifestGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManifestGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3340,13 +3368,20 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3600,13 +3635,20 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ResourceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3908,13 +3950,20 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ResourceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4223,13 +4272,20 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4471,13 +4527,20 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4750,13 +4813,20 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5029,13 +5099,20 @@ impl<'a, C, A> DeploymentTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DeploymentTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5277,13 +5354,20 @@ impl<'a, C, A> DeploymentGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DeploymentGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5556,13 +5640,20 @@ impl<'a, C, A> DeploymentCancelPreviewCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DeploymentCancelPreviewCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentCancelPreviewCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5852,13 +5943,20 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6167,13 +6265,20 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6446,13 +6551,20 @@ impl<'a, C, A> DeploymentStopCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6725,13 +6837,20 @@ impl<'a, C, A> DeploymentSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DeploymentSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6985,13 +7104,20 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/deploymentmanager2_beta2/src/lib.rs b/gen/deploymentmanager2_beta2/src/lib.rs index 0e3195fe49..a3b121f08a 100644 --- a/gen/deploymentmanager2_beta2/src/lib.rs +++ b/gen/deploymentmanager2_beta2/src/lib.rs @@ -1612,13 +1612,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1892,13 +1899,20 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2184,13 +2198,20 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManifestListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManifestListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2444,13 +2465,20 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManifestGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManifestGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2704,13 +2732,20 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ResourceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2996,13 +3031,20 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ResourceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3276,13 +3318,20 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3591,13 +3640,20 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3839,13 +3895,20 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4106,13 +4169,20 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4386,13 +4456,20 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4701,13 +4778,20 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4949,13 +5033,20 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d1/src/lib.rs b/gen/dfareporting2d1/src/lib.rs index ac9b068ac9..07e7617503 100644 --- a/gen/dfareporting2d1/src/lib.rs +++ b/gen/dfareporting2d1/src/lib.rs @@ -13473,13 +13473,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13709,13 +13716,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13957,13 +13971,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14193,13 +14214,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14484,13 +14512,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14744,13 +14779,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14993,13 +15035,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15272,13 +15321,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15551,13 +15607,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15874,13 +15937,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16141,13 +16211,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16467,13 +16544,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16704,13 +16788,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16952,13 +17043,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17219,13 +17317,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17498,13 +17603,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17765,13 +17877,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18013,13 +18132,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18280,13 +18406,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18517,13 +18650,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18796,13 +18936,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19131,13 +19278,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19379,13 +19533,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19615,13 +19776,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19875,13 +20043,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20154,13 +20329,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20402,13 +20584,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20681,13 +20870,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20972,13 +21168,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21221,13 +21424,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21317,9 +21527,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21893,13 +22110,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22177,13 +22401,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22542,13 +22773,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22790,13 +23028,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23038,13 +23283,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23317,13 +23569,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23584,13 +23843,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23844,13 +24110,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24123,13 +24396,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24419,13 +24699,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24686,13 +24973,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24965,13 +25259,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25232,13 +25533,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25480,13 +25788,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25761,13 +26076,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25998,13 +26320,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26294,13 +26623,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26561,13 +26897,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26840,13 +27183,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27229,13 +27579,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27496,13 +27853,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27744,13 +28108,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28035,13 +28406,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28272,13 +28650,20 @@ impl<'a, C, A> FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28520,13 +28905,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28799,13 +29191,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29146,13 +29545,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29413,13 +29819,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29680,13 +30093,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29916,13 +30336,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30254,13 +30681,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30514,13 +30948,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30762,13 +31203,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31088,13 +31536,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31291,13 +31746,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31527,13 +31989,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31806,13 +32275,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32073,13 +32549,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32627,13 +33110,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32875,13 +33365,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33142,13 +33639,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33390,13 +33894,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33626,13 +34137,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33862,13 +34380,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34110,13 +34635,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34358,13 +34890,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34669,13 +35208,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34936,13 +35482,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35203,13 +35756,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35482,13 +36042,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35719,13 +36286,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35986,13 +36560,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36234,13 +36815,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36659,13 +37247,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36926,13 +37521,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37205,13 +37807,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37453,13 +38062,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37851,13 +38467,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38118,13 +38741,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38355,13 +38985,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38634,13 +39271,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38882,13 +39526,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39149,13 +39800,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39385,13 +40043,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39652,13 +40317,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39900,13 +40572,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40167,13 +40846,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40505,13 +41191,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40784,13 +41477,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41104,13 +41804,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41352,13 +42059,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41631,13 +42345,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41898,13 +42619,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42209,13 +42937,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42476,13 +43211,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42724,13 +43466,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42972,13 +43721,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43208,13 +43964,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43456,13 +44219,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43723,13 +44493,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44002,13 +44779,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44253,13 +45037,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44489,13 +45280,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44737,13 +45535,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45033,13 +45838,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45302,13 +46114,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45742,13 +46561,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46009,13 +46835,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46276,13 +47109,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46524,13 +47364,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46803,13 +47650,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47156,13 +48010,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47416,13 +48277,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47664,13 +48532,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47915,13 +48790,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48151,13 +49033,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48399,13 +49288,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48710,13 +49606,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48977,13 +49880,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49244,13 +50154,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49481,13 +50398,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49729,13 +50653,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50008,13 +50939,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50275,13 +51213,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50542,13 +51487,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50790,13 +51742,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51236,13 +52195,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51515,13 +52481,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51763,13 +52736,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52054,13 +53034,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52333,13 +53320,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52600,13 +53594,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53004,13 +54005,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53241,13 +54249,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53603,13 +54618,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53870,13 +54892,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54149,13 +55178,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54416,13 +55452,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54664,13 +55707,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54912,13 +55962,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55179,13 +56236,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55511,13 +56575,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55790,13 +56861,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56057,13 +57135,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56350,13 +57435,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56617,13 +57709,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56865,13 +57964,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57176,13 +58282,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57413,13 +58526,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57680,13 +58800,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57959,13 +59086,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58285,13 +59419,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58533,13 +59674,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58800,13 +59948,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59195,13 +60350,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59443,13 +60605,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59710,13 +60879,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59997,13 +61173,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60245,13 +61428,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60493,13 +61683,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60760,13 +61957,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61107,13 +62311,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61374,13 +62585,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61653,13 +62871,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61901,13 +63126,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62137,13 +63369,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62385,13 +63624,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62645,13 +63891,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63010,13 +64263,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63258,13 +64518,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63494,13 +64761,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63730,13 +65004,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63978,13 +65259,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64301,13 +65589,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64568,13 +65863,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64847,13 +66149,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65126,13 +66435,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65611,13 +66927,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65878,13 +67201,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66145,13 +67475,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66423,13 +67760,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66671,13 +68015,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d2/src/lib.rs b/gen/dfareporting2d2/src/lib.rs index f3167aa5f1..d9b38db403 100644 --- a/gen/dfareporting2d2/src/lib.rs +++ b/gen/dfareporting2d2/src/lib.rs @@ -13493,13 +13493,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13729,13 +13736,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13977,13 +13991,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14213,13 +14234,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14504,13 +14532,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14764,13 +14799,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15013,13 +15055,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15292,13 +15341,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15571,13 +15627,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15894,13 +15957,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16161,13 +16231,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16487,13 +16564,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16724,13 +16808,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16972,13 +17063,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17239,13 +17337,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17518,13 +17623,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17785,13 +17897,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18033,13 +18152,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18300,13 +18426,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18537,13 +18670,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18816,13 +18956,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19151,13 +19298,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19399,13 +19553,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19635,13 +19796,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19895,13 +20063,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20174,13 +20349,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20422,13 +20604,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20701,13 +20890,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20992,13 +21188,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21241,13 +21444,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21337,9 +21547,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21913,13 +22130,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22197,13 +22421,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22562,13 +22793,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22810,13 +23048,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23058,13 +23303,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23337,13 +23589,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23604,13 +23863,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23864,13 +24130,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24143,13 +24416,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24439,13 +24719,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24706,13 +24993,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24985,13 +25279,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25252,13 +25553,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25500,13 +25808,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25781,13 +26096,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26018,13 +26340,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26314,13 +26643,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26581,13 +26917,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26860,13 +27203,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27249,13 +27599,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27516,13 +27873,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27764,13 +28128,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28055,13 +28426,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28292,13 +28670,20 @@ impl<'a, C, A> FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28540,13 +28925,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28819,13 +29211,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29166,13 +29565,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29433,13 +29839,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29700,13 +30113,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29936,13 +30356,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30274,13 +30701,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30534,13 +30968,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30782,13 +31223,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31108,13 +31556,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31311,13 +31766,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31547,13 +32009,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31826,13 +32295,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32093,13 +32569,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32647,13 +33130,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32895,13 +33385,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33162,13 +33659,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33410,13 +33914,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33646,13 +34157,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33882,13 +34400,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34130,13 +34655,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34378,13 +34910,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34689,13 +35228,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34956,13 +35502,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35223,13 +35776,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35502,13 +36062,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35739,13 +36306,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36006,13 +36580,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36254,13 +36835,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36679,13 +37267,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36946,13 +37541,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37225,13 +37827,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37473,13 +38082,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37871,13 +38487,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38138,13 +38761,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38375,13 +39005,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38654,13 +39291,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38902,13 +39546,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39169,13 +39820,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39405,13 +40063,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39672,13 +40337,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39920,13 +40592,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40187,13 +40866,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40525,13 +41211,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40804,13 +41497,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41124,13 +41824,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41372,13 +42079,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41651,13 +42365,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41918,13 +42639,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42229,13 +42957,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42496,13 +43231,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42744,13 +43486,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42992,13 +43741,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43228,13 +43984,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43476,13 +44239,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43743,13 +44513,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44022,13 +44799,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44273,13 +45057,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44509,13 +45300,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44757,13 +45555,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45053,13 +45858,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45322,13 +46134,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45810,13 +46629,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46077,13 +46903,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46344,13 +47177,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46592,13 +47432,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46871,13 +47718,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47224,13 +48078,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47484,13 +48345,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47732,13 +48600,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47983,13 +48858,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48219,13 +49101,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48467,13 +49356,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48778,13 +49674,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49045,13 +49948,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49312,13 +50222,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49549,13 +50466,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49797,13 +50721,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50076,13 +51007,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50343,13 +51281,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50610,13 +51555,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50858,13 +51810,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51304,13 +52263,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51583,13 +52549,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51831,13 +52804,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52122,13 +53102,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52401,13 +53388,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52668,13 +53662,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53072,13 +54073,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53309,13 +54317,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53671,13 +54686,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53938,13 +54960,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54217,13 +55246,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54484,13 +55520,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54732,13 +55775,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54980,13 +56030,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55247,13 +56304,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55579,13 +56643,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55858,13 +56929,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56125,13 +57203,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56418,13 +57503,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56685,13 +57777,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56933,13 +58032,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57244,13 +58350,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57481,13 +58594,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57748,13 +58868,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58027,13 +59154,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58353,13 +59487,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58601,13 +59742,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58868,13 +60016,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59263,13 +60418,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59511,13 +60673,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59778,13 +60947,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60065,13 +61241,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60313,13 +61496,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60561,13 +61751,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60828,13 +62025,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61175,13 +62379,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61442,13 +62653,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61721,13 +62939,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61969,13 +63194,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62205,13 +63437,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62453,13 +63692,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62713,13 +63959,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63078,13 +64331,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63326,13 +64586,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63562,13 +64829,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63798,13 +65072,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64046,13 +65327,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64369,13 +65657,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64636,13 +65931,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64915,13 +66217,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65194,13 +66503,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65727,13 +67043,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65994,13 +67317,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66261,13 +67591,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66539,13 +67876,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66787,13 +68131,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d3/src/lib.rs b/gen/dfareporting2d3/src/lib.rs index 0e087ebf49..9a8f52373a 100644 --- a/gen/dfareporting2d3/src/lib.rs +++ b/gen/dfareporting2d3/src/lib.rs @@ -13479,13 +13479,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13715,13 +13722,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13963,13 +13977,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14199,13 +14220,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14490,13 +14518,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14750,13 +14785,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14999,13 +15041,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15278,13 +15327,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15557,13 +15613,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15880,13 +15943,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16147,13 +16217,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16473,13 +16550,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16710,13 +16794,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16958,13 +17049,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17225,13 +17323,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17504,13 +17609,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17771,13 +17883,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18019,13 +18138,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18286,13 +18412,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18523,13 +18656,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18802,13 +18942,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19137,13 +19284,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19385,13 +19539,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19621,13 +19782,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19881,13 +20049,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20160,13 +20335,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20408,13 +20590,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20687,13 +20876,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20978,13 +21174,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21227,13 +21430,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21323,9 +21533,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21899,13 +22116,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22183,13 +22407,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22548,13 +22779,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22796,13 +23034,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23044,13 +23289,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23323,13 +23575,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23590,13 +23849,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23850,13 +24116,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24129,13 +24402,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24425,13 +24705,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24692,13 +24979,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24971,13 +25265,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25238,13 +25539,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25486,13 +25794,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25767,13 +26082,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26004,13 +26326,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26300,13 +26629,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26567,13 +26903,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26846,13 +27189,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27235,13 +27585,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27502,13 +27859,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27750,13 +28114,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28041,13 +28412,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28289,13 +28667,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28568,13 +28953,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28915,13 +29307,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29182,13 +29581,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29449,13 +29855,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29685,13 +30098,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30023,13 +30443,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30283,13 +30710,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30531,13 +30965,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30857,13 +31298,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31060,13 +31508,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31296,13 +31751,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31575,13 +32037,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31842,13 +32311,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32396,13 +32872,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32644,13 +33127,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32911,13 +33401,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33159,13 +33656,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33395,13 +33899,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33631,13 +34142,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33879,13 +34397,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34127,13 +34652,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34438,13 +34970,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34705,13 +35244,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34972,13 +35518,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35251,13 +35804,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35488,13 +36048,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35755,13 +36322,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36003,13 +36577,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36428,13 +37009,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36695,13 +37283,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36974,13 +37569,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37222,13 +37824,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37620,13 +38229,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37887,13 +38503,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38124,13 +38747,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38403,13 +39033,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38651,13 +39288,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38918,13 +39562,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39154,13 +39805,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39421,13 +40079,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39669,13 +40334,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39936,13 +40608,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40274,13 +40953,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40553,13 +41239,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40873,13 +41566,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41121,13 +41821,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41400,13 +42107,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41667,13 +42381,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41978,13 +42699,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42245,13 +42973,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42493,13 +43228,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42741,13 +43483,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42977,13 +43726,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43225,13 +43981,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43492,13 +44255,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43771,13 +44541,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44022,13 +44799,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44258,13 +45042,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44506,13 +45297,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44802,13 +45600,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45071,13 +45876,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45559,13 +46371,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45826,13 +46645,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46093,13 +46919,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46341,13 +47174,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46620,13 +47460,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46973,13 +47820,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47233,13 +48087,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47481,13 +48342,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47732,13 +48600,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47968,13 +48843,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48216,13 +49098,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48527,13 +49416,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48794,13 +49690,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49061,13 +49964,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49298,13 +50208,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49546,13 +50463,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49825,13 +50749,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50092,13 +51023,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50359,13 +51297,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50607,13 +51552,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51053,13 +52005,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51332,13 +52291,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51580,13 +52546,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51871,13 +52844,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52150,13 +53130,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52417,13 +53404,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52821,13 +53815,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53058,13 +54059,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53420,13 +54428,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53687,13 +54702,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53966,13 +54988,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54233,13 +55262,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54481,13 +55517,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54729,13 +55772,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54996,13 +56046,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55328,13 +56385,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55607,13 +56671,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55874,13 +56945,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56167,13 +57245,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56434,13 +57519,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56682,13 +57774,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56993,13 +58092,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57230,13 +58336,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57497,13 +58610,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57776,13 +58896,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58102,13 +59229,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58350,13 +59484,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58617,13 +59758,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59012,13 +60160,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59260,13 +60415,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59527,13 +60689,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59814,13 +60983,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60062,13 +61238,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60310,13 +61493,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60577,13 +61767,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60924,13 +62121,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61191,13 +62395,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61470,13 +62681,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61718,13 +62936,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61954,13 +63179,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62202,13 +63434,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62462,13 +63701,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62827,13 +64073,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63075,13 +64328,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63311,13 +64571,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63547,13 +64814,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63795,13 +65069,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64118,13 +65399,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64385,13 +65673,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64664,13 +65959,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64943,13 +66245,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65476,13 +66785,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65743,13 +67059,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66010,13 +67333,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66288,13 +67618,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66536,13 +67873,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d4/src/lib.rs b/gen/dfareporting2d4/src/lib.rs index e39d680c86..36ca58ceb6 100644 --- a/gen/dfareporting2d4/src/lib.rs +++ b/gen/dfareporting2d4/src/lib.rs @@ -13483,13 +13483,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13719,13 +13726,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13967,13 +13981,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14203,13 +14224,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14494,13 +14522,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14754,13 +14789,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15003,13 +15045,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15282,13 +15331,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15561,13 +15617,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15884,13 +15947,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16151,13 +16221,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16477,13 +16554,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16714,13 +16798,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16962,13 +17053,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17229,13 +17327,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17508,13 +17613,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17775,13 +17887,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18023,13 +18142,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18290,13 +18416,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18527,13 +18660,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18806,13 +18946,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19141,13 +19288,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19389,13 +19543,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19625,13 +19786,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19885,13 +20053,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20164,13 +20339,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20412,13 +20594,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20691,13 +20880,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20982,13 +21178,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21231,13 +21434,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21327,9 +21537,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21903,13 +22120,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22187,13 +22411,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22552,13 +22783,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22800,13 +23038,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23048,13 +23293,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23327,13 +23579,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23594,13 +23853,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23854,13 +24120,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24133,13 +24406,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24429,13 +24709,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24696,13 +24983,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24975,13 +25269,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25242,13 +25543,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25490,13 +25798,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25771,13 +26086,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26008,13 +26330,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26304,13 +26633,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26571,13 +26907,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26850,13 +27193,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27239,13 +27589,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27506,13 +27863,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27754,13 +28118,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28045,13 +28416,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28293,13 +28671,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28572,13 +28957,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28919,13 +29311,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29186,13 +29585,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29453,13 +29859,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29689,13 +30102,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30027,13 +30447,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30287,13 +30714,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30535,13 +30969,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30861,13 +31302,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31064,13 +31512,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31300,13 +31755,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31579,13 +32041,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31846,13 +32315,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32400,13 +32876,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32648,13 +33131,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32915,13 +33405,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33163,13 +33660,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33399,13 +33903,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33635,13 +34146,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33883,13 +34401,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34131,13 +34656,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34442,13 +34974,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34709,13 +35248,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34976,13 +35522,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35255,13 +35808,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35492,13 +36052,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35759,13 +36326,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36007,13 +36581,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36432,13 +37013,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36699,13 +37287,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36978,13 +37573,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37226,13 +37828,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37624,13 +38233,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37891,13 +38507,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38128,13 +38751,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38407,13 +39037,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38655,13 +39292,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38922,13 +39566,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39158,13 +39809,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39425,13 +40083,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39673,13 +40338,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39940,13 +40612,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40278,13 +40957,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40557,13 +41243,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40877,13 +41570,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41125,13 +41825,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41404,13 +42111,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41671,13 +42385,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41982,13 +42703,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42249,13 +42977,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42497,13 +43232,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42745,13 +43487,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42981,13 +43730,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43229,13 +43985,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43496,13 +44259,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43775,13 +44545,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44026,13 +44803,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44262,13 +45046,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44510,13 +45301,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44806,13 +45604,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45075,13 +45880,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45563,13 +46375,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45830,13 +46649,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46097,13 +46923,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46345,13 +47178,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46624,13 +47464,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46989,13 +47836,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47249,13 +48103,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47497,13 +48358,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47748,13 +48616,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47984,13 +48859,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48232,13 +49114,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48543,13 +49432,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48810,13 +49706,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49077,13 +49980,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49314,13 +50224,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49562,13 +50479,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49841,13 +50765,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50108,13 +51039,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50375,13 +51313,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50623,13 +51568,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51069,13 +52021,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51348,13 +52307,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51596,13 +52562,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51887,13 +52860,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52166,13 +53146,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52433,13 +53420,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52837,13 +53831,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53074,13 +54075,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53436,13 +54444,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53703,13 +54718,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53982,13 +55004,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54249,13 +55278,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54497,13 +55533,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54745,13 +55788,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55012,13 +56062,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55344,13 +56401,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55623,13 +56687,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55890,13 +56961,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56183,13 +57261,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56450,13 +57535,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56698,13 +57790,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57009,13 +58108,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57246,13 +58352,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57513,13 +58626,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57792,13 +58912,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58118,13 +59245,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58366,13 +59500,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58633,13 +59774,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59028,13 +60176,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59276,13 +60431,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59543,13 +60705,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59830,13 +60999,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60078,13 +61254,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60326,13 +61509,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60593,13 +61783,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60940,13 +62137,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61207,13 +62411,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61486,13 +62697,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61734,13 +62952,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61970,13 +63195,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62218,13 +63450,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62478,13 +63717,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62843,13 +64089,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63091,13 +64344,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63327,13 +64587,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63563,13 +64830,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63811,13 +65085,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64134,13 +65415,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64401,13 +65689,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64680,13 +65975,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64959,13 +66261,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65492,13 +66801,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65759,13 +67075,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66026,13 +67349,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66304,13 +67634,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66552,13 +67889,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d5/src/lib.rs b/gen/dfareporting2d5/src/lib.rs index b926acf118..803fbdd2fc 100644 --- a/gen/dfareporting2d5/src/lib.rs +++ b/gen/dfareporting2d5/src/lib.rs @@ -13902,13 +13902,20 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14150,13 +14157,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14386,13 +14400,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14634,13 +14655,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14870,13 +14898,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15161,13 +15196,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15421,13 +15463,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15670,13 +15719,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15949,13 +16005,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16228,13 +16291,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16551,13 +16621,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16818,13 +16895,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17144,13 +17228,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17381,13 +17472,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17629,13 +17727,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17896,13 +18001,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18175,13 +18287,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18442,13 +18561,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18690,13 +18816,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18957,13 +19090,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19194,13 +19334,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19473,13 +19620,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19808,13 +19962,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20056,13 +20217,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20292,13 +20460,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20552,13 +20727,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20831,13 +21013,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21079,13 +21268,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21358,13 +21554,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21649,13 +21852,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21898,13 +22108,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21994,9 +22211,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22570,13 +22794,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22854,13 +23085,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23219,13 +23457,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23467,13 +23712,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23715,13 +23967,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23994,13 +24253,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24261,13 +24527,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24521,13 +24794,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24800,13 +25080,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25096,13 +25383,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25363,13 +25657,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25642,13 +25943,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25909,13 +26217,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26157,13 +26472,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26438,13 +26760,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26675,13 +27004,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26971,13 +27307,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27238,13 +27581,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27517,13 +27867,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27906,13 +28263,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28173,13 +28537,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28421,13 +28792,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28712,13 +29090,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28960,13 +29345,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29239,13 +29631,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29586,13 +29985,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29853,13 +30259,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30120,13 +30533,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30356,13 +30776,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30694,13 +31121,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30954,13 +31388,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31202,13 +31643,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31528,13 +31976,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31731,13 +32186,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31967,13 +32429,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32246,13 +32715,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32513,13 +32989,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33067,13 +33550,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33315,13 +33805,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33582,13 +34079,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33830,13 +34334,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34066,13 +34577,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34302,13 +34820,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34550,13 +35075,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34798,13 +35330,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35109,13 +35648,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35376,13 +35922,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35643,13 +36196,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35922,13 +36482,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36159,13 +36726,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36426,13 +37000,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36674,13 +37255,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37099,13 +37687,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37366,13 +37961,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37645,13 +38247,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37893,13 +38502,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38291,13 +38907,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38558,13 +39181,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38795,13 +39425,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39074,13 +39711,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39322,13 +39966,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39589,13 +40240,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39825,13 +40483,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40092,13 +40757,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40340,13 +41012,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40607,13 +41286,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40945,13 +41631,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41224,13 +41917,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41544,13 +42244,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41792,13 +42499,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42071,13 +42785,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42338,13 +43059,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42605,13 +43333,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42916,13 +43651,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43164,13 +43906,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43412,13 +44161,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43648,13 +44404,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43896,13 +44659,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44163,13 +44933,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44442,13 +45219,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44693,13 +45477,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44929,13 +45720,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45177,13 +45975,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45473,13 +46278,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45742,13 +46554,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46230,13 +47049,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46497,13 +47323,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46764,13 +47597,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47012,13 +47852,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47291,13 +48138,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47656,13 +48510,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47916,13 +48777,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48164,13 +49032,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48415,13 +49290,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48651,13 +49533,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48899,13 +49788,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49210,13 +50106,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49477,13 +50380,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49744,13 +50654,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49981,13 +50898,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50229,13 +51153,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50508,13 +51439,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50775,13 +51713,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51042,13 +51987,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51290,13 +52242,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51736,13 +52695,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52015,13 +52981,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52263,13 +53236,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52554,13 +53534,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52833,13 +53820,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53100,13 +54094,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53504,13 +54505,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53741,13 +54749,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54103,13 +55118,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54370,13 +55392,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54649,13 +55678,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54916,13 +55952,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55164,13 +56207,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55412,13 +56462,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55679,13 +56736,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56011,13 +57075,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56290,13 +57361,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56557,13 +57635,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56850,13 +57935,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57117,13 +58209,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57365,13 +58464,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57676,13 +58782,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57913,13 +59026,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58180,13 +59300,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58459,13 +59586,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58785,13 +59919,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59033,13 +60174,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59300,13 +60448,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59695,13 +60850,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59943,13 +61105,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60204,13 +61373,20 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60491,13 +61667,20 @@ impl<'a, C, A> DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60758,13 +61941,20 @@ impl<'a, C, A> DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61025,13 +62215,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61312,13 +62509,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61560,13 +62764,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61808,13 +63019,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62075,13 +63293,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62422,13 +63647,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62689,13 +63921,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62968,13 +64207,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63216,13 +64462,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63452,13 +64705,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63700,13 +64960,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63960,13 +65227,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64325,13 +65599,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64573,13 +65854,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64809,13 +66097,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65045,13 +66340,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65293,13 +66595,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65616,13 +66925,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65883,13 +67199,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66162,13 +67485,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66441,13 +67771,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66974,13 +68311,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67241,13 +68585,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67508,13 +68859,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67786,13 +69144,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68034,13 +69399,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d6/src/lib.rs b/gen/dfareporting2d6/src/lib.rs index 9d304f4dd0..a5622b4315 100644 --- a/gen/dfareporting2d6/src/lib.rs +++ b/gen/dfareporting2d6/src/lib.rs @@ -14317,13 +14317,20 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14565,13 +14572,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14801,13 +14815,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15049,13 +15070,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15285,13 +15313,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15545,13 +15580,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15910,13 +15952,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16177,13 +16226,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16503,13 +16559,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16740,13 +16803,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16988,13 +17058,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17255,13 +17332,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17534,13 +17618,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17801,13 +17892,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18049,13 +18147,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18316,13 +18421,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18553,13 +18665,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18832,13 +18951,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19167,13 +19293,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19415,13 +19548,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19651,13 +19791,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19911,13 +20058,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20190,13 +20344,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20438,13 +20599,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20717,13 +20885,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21008,13 +21183,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21257,13 +21439,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21353,9 +21542,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21929,13 +22125,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22213,13 +22416,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22578,13 +22788,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22826,13 +23043,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23074,13 +23298,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23353,13 +23584,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23620,13 +23858,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23880,13 +24125,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24159,13 +24411,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24455,13 +24714,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24722,13 +24988,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25001,13 +25274,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25268,13 +25548,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25516,13 +25803,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25797,13 +26091,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26034,13 +26335,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26330,13 +26638,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26597,13 +26912,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26876,13 +27198,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27265,13 +27594,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27532,13 +27868,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27780,13 +28123,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28071,13 +28421,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28319,13 +28676,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28598,13 +28962,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28945,13 +29316,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29212,13 +29590,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29479,13 +29864,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29715,13 +30107,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30053,13 +30452,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30313,13 +30719,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30549,13 +30962,20 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LanguageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LanguageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30797,13 +31217,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31123,13 +31550,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31326,13 +31760,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31562,13 +32003,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31841,13 +32289,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32108,13 +32563,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32662,13 +33124,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32910,13 +33379,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33177,13 +33653,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33425,13 +33908,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33661,13 +34151,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33897,13 +34394,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34145,13 +34649,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34465,13 +34976,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34713,13 +35231,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34961,13 +35486,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35272,13 +35804,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35539,13 +36078,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35806,13 +36352,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36085,13 +36638,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36322,13 +36882,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36589,13 +37156,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36837,13 +37411,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37262,13 +37843,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37529,13 +38117,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37808,13 +38403,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38056,13 +38658,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38454,13 +39063,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38721,13 +39337,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38958,13 +39581,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39237,13 +39867,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39485,13 +40122,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39752,13 +40396,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39988,13 +40639,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40255,13 +40913,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40503,13 +41168,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40770,13 +41442,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41108,13 +41787,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41387,13 +42073,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41666,13 +42359,20 @@ impl<'a, C, A> TargetingTemplatePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplatePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplatePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41989,13 +42689,20 @@ impl<'a, C, A> TargetingTemplateListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42237,13 +42944,20 @@ impl<'a, C, A> TargetingTemplateGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42504,13 +43218,20 @@ impl<'a, C, A> TargetingTemplateInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42771,13 +43492,20 @@ impl<'a, C, A> TargetingTemplateUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43050,13 +43778,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43317,13 +44052,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43584,13 +44326,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43895,13 +44644,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44143,13 +44899,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44391,13 +45154,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44627,13 +45397,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44875,13 +45652,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45142,13 +45926,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45421,13 +46212,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45672,13 +46470,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45908,13 +46713,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46156,13 +46968,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46452,13 +47271,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46721,13 +47547,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47209,13 +48042,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47476,13 +48316,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47743,13 +48590,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47991,13 +48845,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48270,13 +49131,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48635,13 +49503,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48895,13 +49770,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49143,13 +50025,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49394,13 +50283,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49630,13 +50526,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49878,13 +50781,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50189,13 +51099,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50456,13 +51373,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50723,13 +51647,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50960,13 +51891,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51208,13 +52146,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51487,13 +52432,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51754,13 +52706,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52021,13 +52980,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52269,13 +53235,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52715,13 +53688,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52994,13 +53974,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53242,13 +54229,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53533,13 +54527,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53812,13 +54813,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54079,13 +55087,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54483,13 +55498,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54720,13 +55742,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55082,13 +56111,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55349,13 +56385,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55628,13 +56671,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55895,13 +56945,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56143,13 +57200,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56391,13 +57455,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56658,13 +57729,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56990,13 +58068,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57269,13 +58354,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57536,13 +58628,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57829,13 +58928,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58096,13 +59202,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58344,13 +59457,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58655,13 +59775,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58892,13 +60019,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59159,13 +60293,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59438,13 +60579,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59764,13 +60912,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60012,13 +61167,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60279,13 +61441,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60674,13 +61843,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60922,13 +62098,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61183,13 +62366,20 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61470,13 +62660,20 @@ impl<'a, C, A> DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61737,13 +62934,20 @@ impl<'a, C, A> DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62004,13 +63208,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62291,13 +63502,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62539,13 +63757,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62787,13 +64012,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63054,13 +64286,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63401,13 +64640,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63668,13 +64914,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63947,13 +65200,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64195,13 +65455,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64431,13 +65698,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64679,13 +65953,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64970,13 +66251,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65230,13 +66518,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65479,13 +66774,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65758,13 +67060,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66037,13 +67346,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66360,13 +67676,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66608,13 +67931,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66844,13 +68174,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67080,13 +68417,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67328,13 +68672,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67651,13 +69002,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67918,13 +69276,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68197,13 +69562,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68476,13 +69848,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69009,13 +70388,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69257,13 +70643,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69524,13 +70917,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69791,13 +71191,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -70069,13 +71476,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dfareporting2d7/src/lib.rs b/gen/dfareporting2d7/src/lib.rs index fc4f309436..e1266aae22 100644 --- a/gen/dfareporting2d7/src/lib.rs +++ b/gen/dfareporting2d7/src/lib.rs @@ -14566,13 +14566,20 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionBatchinsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14814,13 +14821,20 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15050,13 +15064,20 @@ impl<'a, C, A> UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15298,13 +15319,20 @@ impl<'a, C, A> PlatformTypeGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15534,13 +15562,20 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlatformTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlatformTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15794,13 +15829,20 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16159,13 +16201,20 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderDocumentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderDocumentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16426,13 +16475,20 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16752,13 +16808,20 @@ impl<'a, C, A> CreativeFieldListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16989,13 +17052,20 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17237,13 +17307,20 @@ impl<'a, C, A> CreativeFieldGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeFieldGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17504,13 +17581,20 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17783,13 +17867,20 @@ impl<'a, C, A> CreativeFieldPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18050,13 +18141,20 @@ impl<'a, C, A> UserRoleInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18298,13 +18396,20 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18565,13 +18670,20 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18802,13 +18914,20 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19081,13 +19200,20 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRolePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19416,13 +19542,20 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserRoleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRoleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19664,13 +19797,20 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19900,13 +20040,20 @@ impl<'a, C, A> OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20160,13 +20307,20 @@ impl<'a, C, A> LandingPageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20439,13 +20593,20 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20687,13 +20848,20 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20966,13 +21134,20 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21257,13 +21432,20 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPagePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPagePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21506,13 +21688,20 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LandingPageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LandingPageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21602,9 +21791,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CreativeAssetInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeAssetInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22178,13 +22374,20 @@ impl<'a, C, A> CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22462,13 +22665,20 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignCreativeAssociationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignCreativeAssociationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22827,13 +23037,20 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23075,13 +23292,20 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeLogGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeLogGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23323,13 +23547,20 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23602,13 +23833,20 @@ impl<'a, C, A> RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListSharePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23869,13 +24107,20 @@ impl<'a, C, A> RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListShareUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24129,13 +24374,20 @@ impl<'a, C, A> ReportRunCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRunCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRunCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24408,13 +24660,20 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24704,13 +24963,20 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24971,13 +25237,20 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25238,13 +25511,20 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportCompatibleFieldQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25486,13 +25766,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25767,13 +26054,20 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportFileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportFileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26004,13 +26298,20 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26283,13 +26584,20 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26579,13 +26887,20 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26846,13 +27161,20 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27125,13 +27447,20 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27514,13 +27843,20 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27781,13 +28117,20 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28029,13 +28372,20 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdvertiserGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28320,13 +28670,20 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DimensionValueQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28568,13 +28925,20 @@ impl<'a, C, A> FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28847,13 +29211,20 @@ impl<'a, C, A> FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29194,13 +29565,20 @@ impl<'a, C, A> FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29461,13 +29839,20 @@ impl<'a, C, A> FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29728,13 +30113,20 @@ impl<'a, C, A> FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -29964,13 +30356,20 @@ impl<'a, C, A> MetroListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MetroListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetroListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30302,13 +30701,20 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30562,13 +30968,20 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -30798,13 +31211,20 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LanguageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LanguageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31046,13 +31466,20 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31372,13 +31799,20 @@ impl<'a, C, A> DirectorySiteContactListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31575,13 +32009,20 @@ impl<'a, C, A> UserProfileListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -31811,13 +32252,20 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32090,13 +32538,20 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32357,13 +32812,20 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -32899,13 +33361,20 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33147,13 +33616,20 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33414,13 +33890,20 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AdUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33662,13 +34145,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -33898,13 +34388,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34134,13 +34631,20 @@ impl<'a, C, A> ConnectionTypeListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34382,13 +34886,20 @@ impl<'a, C, A> ConnectionTypeGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConnectionTypeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConnectionTypeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34702,13 +35213,20 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -34950,13 +35468,20 @@ impl<'a, C, A> TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetableRemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35198,13 +35723,20 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35509,13 +36041,20 @@ impl<'a, C, A> AdvertiserGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -35776,13 +36315,20 @@ impl<'a, C, A> AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36043,13 +36589,20 @@ impl<'a, C, A> AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36322,13 +36875,20 @@ impl<'a, C, A> AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36559,13 +37119,20 @@ impl<'a, C, A> AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AdvertiserGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -36826,13 +37393,20 @@ impl<'a, C, A> SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37074,13 +37648,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37499,13 +38080,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -37766,13 +38354,20 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38045,13 +38640,20 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38293,13 +38895,20 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38691,13 +39300,20 @@ impl<'a, C, A> FloodlightActivityListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -38958,13 +39574,20 @@ impl<'a, C, A> FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39195,13 +39818,20 @@ impl<'a, C, A> FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39474,13 +40104,20 @@ impl<'a, C, A> FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39722,13 +40359,20 @@ impl<'a, C, A> FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -39989,13 +40633,20 @@ impl<'a, C, A> FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightActivityUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40225,13 +40876,20 @@ impl<'a, C, A> RegionListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40492,13 +41150,20 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -40740,13 +41405,20 @@ impl<'a, C, A> CreativeGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41007,13 +41679,20 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41345,13 +42024,20 @@ impl<'a, C, A> CreativeGroupListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41624,13 +42310,20 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -41903,13 +42596,20 @@ impl<'a, C, A> TargetingTemplatePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplatePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplatePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42226,13 +42926,20 @@ impl<'a, C, A> TargetingTemplateListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42474,13 +43181,20 @@ impl<'a, C, A> TargetingTemplateGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -42741,13 +43455,20 @@ impl<'a, C, A> TargetingTemplateInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43008,13 +43729,20 @@ impl<'a, C, A> TargetingTemplateUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TargetingTemplateUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TargetingTemplateUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43287,13 +44015,20 @@ impl<'a, C, A> SubaccountPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43554,13 +44289,20 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -43821,13 +44563,20 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44132,13 +44881,20 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44380,13 +45136,20 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubaccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubaccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44628,13 +45391,20 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -44864,13 +45634,20 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileCarrierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileCarrierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45112,13 +45889,20 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45379,13 +46163,20 @@ impl<'a, C, A> FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45658,13 +46449,20 @@ impl<'a, C, A> FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -45909,13 +46707,20 @@ impl<'a, C, A> FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FloodlightConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46145,13 +46950,20 @@ impl<'a, C, A> OperatingSystemListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46393,13 +47205,20 @@ impl<'a, C, A> OperatingSystemGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperatingSystemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46689,13 +47508,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -46958,13 +47784,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47446,13 +48279,20 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47713,13 +48553,20 @@ impl<'a, C, A> PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -47980,13 +48827,20 @@ impl<'a, C, A> PlacementGroupInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48228,13 +49082,20 @@ impl<'a, C, A> PlacementGroupGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48507,13 +49368,20 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -48872,13 +49740,20 @@ impl<'a, C, A> InventoryItemListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49132,13 +50007,20 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InventoryItemGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InventoryItemGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49380,13 +50262,20 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49631,13 +50520,20 @@ impl<'a, C, A> UserRolePermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserRolePermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -49867,13 +50763,20 @@ impl<'a, C, A> AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50115,13 +51018,20 @@ impl<'a, C, A> AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50426,13 +51336,20 @@ impl<'a, C, A> ContentCategoryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50693,13 +51610,20 @@ impl<'a, C, A> ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -50960,13 +51884,20 @@ impl<'a, C, A> ContentCategoryInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51197,13 +52128,20 @@ impl<'a, C, A> ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51445,13 +52383,20 @@ impl<'a, C, A> ContentCategoryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51724,13 +52669,20 @@ impl<'a, C, A> ContentCategoryPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContentCategoryPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -51991,13 +52943,20 @@ impl<'a, C, A> CreativeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52258,13 +53217,20 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52506,13 +53472,20 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -52952,13 +53925,20 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53231,13 +54211,20 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CreativePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53479,13 +54466,20 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -53770,13 +54764,20 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54049,13 +55050,20 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54316,13 +55324,20 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54720,13 +55735,20 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CampaignListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CampaignListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -54957,13 +55979,20 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55319,13 +56348,20 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55586,13 +56622,20 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -55865,13 +56908,20 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56132,13 +57182,20 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56380,13 +57437,20 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56628,13 +57692,20 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -56895,13 +57966,20 @@ impl<'a, C, A> RemarketingListUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57227,13 +58305,20 @@ impl<'a, C, A> RemarketingListListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57506,13 +58591,20 @@ impl<'a, C, A> RemarketingListPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -57773,13 +58865,20 @@ impl<'a, C, A> RemarketingListInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RemarketingListInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58066,13 +59165,20 @@ impl<'a, C, A> CityListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58333,13 +59439,20 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58581,13 +59694,20 @@ impl<'a, C, A> PlacementStrategyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -58892,13 +60012,20 @@ impl<'a, C, A> PlacementStrategyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59129,13 +60256,20 @@ impl<'a, C, A> PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59396,13 +60530,20 @@ impl<'a, C, A> PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -59675,13 +60816,20 @@ impl<'a, C, A> PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementStrategyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60001,13 +61149,20 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60249,13 +61404,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60516,13 +61678,20 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -60911,13 +62080,20 @@ impl<'a, C, A> DirectorySiteListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61159,13 +62335,20 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DirectorySiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DirectorySiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61407,13 +62590,20 @@ impl<'a, C, A> VideoFormatGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoFormatGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoFormatGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61643,13 +62833,20 @@ impl<'a, C, A> VideoFormatListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoFormatListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoFormatListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -61904,13 +63101,20 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62191,13 +63395,20 @@ impl<'a, C, A> DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62458,13 +63669,20 @@ impl<'a, C, A> DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DynamicTargetingKeyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -62725,13 +63943,20 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63012,13 +64237,20 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63260,13 +64492,20 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SizeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SizeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63508,13 +64747,20 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountActiveAdSummaryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -63775,13 +65021,20 @@ impl<'a, C, A> AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64122,13 +65375,20 @@ impl<'a, C, A> AccountUserProfileListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64389,13 +65649,20 @@ impl<'a, C, A> AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64668,13 +65935,20 @@ impl<'a, C, A> AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -64916,13 +66190,20 @@ impl<'a, C, A> AccountUserProfileGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUserProfileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65152,13 +66433,20 @@ impl<'a, C, A> CountryListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65400,13 +66688,20 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65691,13 +66986,20 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValuePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -65951,13 +67253,20 @@ impl<'a, C, A> CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66200,13 +67509,20 @@ impl<'a, C, A> CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66479,13 +67795,20 @@ impl<'a, C, A> CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -66758,13 +68081,20 @@ impl<'a, C, A> CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67081,13 +68411,20 @@ impl<'a, C, A> CreativeFieldValueListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CreativeFieldValueListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67329,13 +68666,20 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67565,13 +68909,20 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PostalCodeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PostalCodeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -67801,13 +69152,20 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BrowserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BrowserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68049,13 +69407,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68372,13 +69737,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68639,13 +70011,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -68918,13 +70297,20 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69197,13 +70583,20 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69730,13 +71123,20 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -69978,13 +71378,20 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -70245,13 +71652,20 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -70512,13 +71926,20 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlacementUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -70790,13 +72211,20 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlacementGeneratetagCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/dns1/src/lib.rs b/gen/dns1/src/lib.rs index f3861da897..955ba8d020 100644 --- a/gen/dns1/src/lib.rs +++ b/gen/dns1/src/lib.rs @@ -1247,13 +1247,20 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1543,13 +1550,20 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1803,13 +1817,20 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2070,13 +2091,20 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedZoneCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedZoneCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2307,13 +2335,20 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedZoneDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedZoneDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2555,13 +2590,20 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedZoneGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedZoneGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2827,13 +2869,20 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ManagedZoneListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ManagedZoneListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3123,13 +3172,20 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ResourceRecordSetListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResourceRecordSetListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3359,13 +3415,20 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index 26dc5d4f04..9cbc2957ac 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -1407,13 +1407,20 @@ impl<'a, C, A> SdfDownloadCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SdfDownloadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SdfDownloadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1641,13 +1648,20 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LineitemUploadlineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LineitemUploadlineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1875,13 +1889,20 @@ impl<'a, C, A> LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LineitemDownloadlineitemCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LineitemDownloadlineitemCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2111,13 +2132,20 @@ impl<'a, C, A> ReportListreportCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportListreportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportListreportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2314,13 +2342,20 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QueryListqueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QueryListqueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2550,13 +2585,20 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QueryGetqueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QueryGetqueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2784,13 +2826,20 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QueryCreatequeryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QueryCreatequeryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3009,13 +3058,20 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QueryDeletequeryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QueryDeletequeryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3265,13 +3321,20 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QueryRunqueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QueryRunqueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index c634ba12c2..71045459de 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -1466,13 +1466,20 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConversionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1822,13 +1829,20 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConversionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2056,13 +2070,20 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ConversionUpdateAvailabilityCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionUpdateAvailabilityCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2374,13 +2395,20 @@ impl<'a, C, A> ConversionPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConversionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2608,13 +2636,20 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ConversionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ConversionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2856,13 +2891,20 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SavedColumnListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SavedColumnListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3096,13 +3138,20 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetFileCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetFileCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3330,13 +3379,20 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGenerateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGenerateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3566,13 +3622,20 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3800,13 +3863,20 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportRequestCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportRequestCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index 7546705358..cf7a2ac3bf 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -4598,13 +4598,20 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4735,9 +4742,9 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/drive/v2/files", "multipart") + (self.hub._root_url.clone() + "upload/drive/v2/files", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files", "resumable") + (self.hub._root_url.clone() + "resumable/upload/drive/v2/files", "resumable") } else { unreachable!() }; @@ -5054,13 +5061,20 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5302,13 +5316,20 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileUntrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileUntrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5665,13 +5686,20 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileCopyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileCopyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5913,13 +5941,20 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileTrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileTrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6153,13 +6188,20 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileExportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileExportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6345,13 +6387,20 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileEmptyTrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileEmptyTrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6680,13 +6729,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6928,13 +6984,20 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileTouchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileTouchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7155,13 +7218,20 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGenerateIdCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGenerateIdCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7319,9 +7389,9 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/drive/v2/files/{fileId}", "multipart") + (self.hub._root_url.clone() + "upload/drive/v2/files/{fileId}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files/{fileId}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/drive/v2/files/{fileId}", "resumable") } else { unreachable!() }; @@ -7704,13 +7774,20 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7941,13 +8018,20 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8376,13 +8460,20 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FilePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FilePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8693,13 +8784,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8939,13 +9037,20 @@ impl<'a, C, A> TeamdriveInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9175,13 +9280,20 @@ impl<'a, C, A> TeamdriveGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9402,13 +9514,20 @@ impl<'a, C, A> TeamdriveListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9627,13 +9746,20 @@ impl<'a, C, A> TeamdriveDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9894,13 +10020,20 @@ impl<'a, C, A> TeamdriveUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9985,9 +10118,9 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/drive/v2/files/{fileId}/realtime", "multipart") + (self.hub._root_url.clone() + "upload/drive/v2/files/{fileId}/realtime", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files/{fileId}/realtime", "resumable") + (self.hub._root_url.clone() + "resumable/upload/drive/v2/files/{fileId}/realtime", "resumable") } else { unreachable!() }; @@ -10240,13 +10373,20 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RealtimeUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RealtimeUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10480,13 +10620,20 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RealtimeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RealtimeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10716,13 +10863,20 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10955,13 +11109,20 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AppListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AppListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11194,13 +11355,20 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AboutGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AboutGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11431,13 +11599,20 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11691,13 +11866,20 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11958,13 +12140,20 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12237,13 +12426,20 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12516,13 +12712,20 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12800,13 +13003,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13084,13 +13294,20 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChildrenListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChildrenListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13332,13 +13549,20 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChildrenGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChildrenGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13569,13 +13793,20 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChildrenDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChildrenDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13848,13 +14079,20 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChildrenInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChildrenInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14071,13 +14309,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14307,13 +14552,20 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ParentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ParentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14544,13 +14796,20 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ParentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ParentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14823,13 +15082,20 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ParentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ParentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15071,13 +15337,20 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ParentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ParentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15362,13 +15635,20 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15646,13 +15926,20 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15918,13 +16205,20 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16197,13 +16491,20 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16446,13 +16747,20 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16737,13 +17045,20 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16986,13 +17301,20 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17289,13 +17611,20 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17604,13 +17933,20 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17876,13 +18212,20 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18191,13 +18534,20 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18451,13 +18801,20 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18687,13 +19044,20 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PermissionGetIdForEmailCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionGetIdForEmailCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18914,13 +19278,20 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChangeGetStartPageTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeGetStartPageTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19268,13 +19639,20 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19591,13 +19969,20 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19851,13 +20236,20 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20142,13 +20534,20 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20391,13 +20790,20 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20658,13 +21064,20 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20894,13 +21307,20 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21185,13 +21605,20 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21445,13 +21872,20 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PropertyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PropertyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21693,13 +22127,20 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21972,13 +22413,20 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22209,13 +22657,20 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22488,13 +22943,20 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22748,13 +23210,20 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/drive3/src/lib.rs b/gen/drive3/src/lib.rs index b523bdf534..a0405b285f 100644 --- a/gen/drive3/src/lib.rs +++ b/gen/drive3/src/lib.rs @@ -3078,13 +3078,20 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3202,9 +3209,9 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/drive/v3/files/{fileId}", "multipart") + (self.hub._root_url.clone() + "upload/drive/v3/files/{fileId}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/drive/v3/files/{fileId}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/drive/v3/files/{fileId}", "resumable") } else { unreachable!() }; @@ -3531,13 +3538,20 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3771,13 +3785,20 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileExportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileExportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4086,13 +4107,20 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileCopyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileCopyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4278,13 +4306,20 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileEmptyTrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileEmptyTrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4601,13 +4636,20 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4828,13 +4870,20 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGenerateIdCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGenerateIdCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4945,9 +4994,9 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/drive/v3/files", "multipart") + (self.hub._root_url.clone() + "upload/drive/v3/files", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/drive/v3/files", "resumable") + (self.hub._root_url.clone() + "resumable/upload/drive/v3/files", "resumable") } else { unreachable!() }; @@ -5236,13 +5285,20 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5473,13 +5529,20 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5754,13 +5817,20 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FileGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FileGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5990,13 +6060,20 @@ impl<'a, C, A> TeamdriveGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6236,13 +6313,20 @@ impl<'a, C, A> TeamdriveCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6463,13 +6547,20 @@ impl<'a, C, A> TeamdriveListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6688,13 +6779,20 @@ impl<'a, C, A> TeamdriveDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6955,13 +7053,20 @@ impl<'a, C, A> TeamdriveUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TeamdriveUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TeamdriveUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7158,13 +7263,20 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AboutGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AboutGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7395,13 +7507,20 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7655,13 +7774,20 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7934,13 +8060,20 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8201,13 +8334,20 @@ impl<'a, C, A> CommentCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8485,13 +8625,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8708,13 +8855,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8987,13 +9141,20 @@ impl<'a, C, A> ReplyCreateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9271,13 +9432,20 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9543,13 +9711,20 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9792,13 +9967,20 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10083,13 +10265,20 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReplyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReplyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10362,13 +10551,20 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10643,13 +10839,20 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10880,13 +11083,20 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11140,13 +11350,20 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11451,13 +11668,20 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11678,13 +11902,20 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChangeGetStartPageTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeGetStartPageTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12020,13 +12251,20 @@ impl<'a, C, A> ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChangeWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChangeWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12269,13 +12507,20 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12584,13 +12829,20 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12856,13 +13108,20 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13116,13 +13375,20 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13431,13 +13697,20 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PermissionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PermissionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/firebasedynamiclinks1/src/lib.rs b/gen/firebasedynamiclinks1/src/lib.rs index 519a01984a..cb86098365 100644 --- a/gen/firebasedynamiclinks1/src/lib.rs +++ b/gen/firebasedynamiclinks1/src/lib.rs @@ -965,13 +965,20 @@ impl<'a, C, A> ShortLinkCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ShortLinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ShortLinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/fitness1/src/lib.rs b/gen/fitness1/src/lib.rs index 016a2a83dc..a36415d3a8 100644 --- a/gen/fitness1/src/lib.rs +++ b/gen/fitness1/src/lib.rs @@ -1539,13 +1539,20 @@ impl<'a, C, A> UserDatasetAggregateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDatasetAggregateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDatasetAggregateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1787,13 +1794,20 @@ impl<'a, C, A> UserDataSourceDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2071,13 +2085,20 @@ impl<'a, C, A> UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceDatasetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceDatasetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2338,13 +2359,20 @@ impl<'a, C, A> UserDataSourceCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2611,13 +2639,20 @@ impl<'a, C, A> UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceDatasetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceDatasetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2914,13 +2949,20 @@ impl<'a, C, A> UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceDatasetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceDatasetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3163,13 +3205,20 @@ impl<'a, C, A> UserSessionDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSessionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSessionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3411,13 +3460,20 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDataSourceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3692,13 +3748,20 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3976,13 +4039,20 @@ impl<'a, C, A> UserSessionListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSessionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSessionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4267,13 +4337,20 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSessionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSessionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4548,13 +4625,20 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourcePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourcePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4799,13 +4883,20 @@ impl<'a, C, A> UserDataSourceListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserDataSourceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDataSourceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/fusiontables2/src/lib.rs b/gen/fusiontables2/src/lib.rs index dbfe3ed1e2..3fef4cc6ac 100644 --- a/gen/fusiontables2/src/lib.rs +++ b/gen/fusiontables2/src/lib.rs @@ -2126,13 +2126,20 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StyleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StyleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2405,13 +2412,20 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StyleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StyleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2672,13 +2686,20 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StyleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StyleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2920,13 +2941,20 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StyleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StyleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3157,13 +3185,20 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StyleDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StyleDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3436,13 +3471,20 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> StylePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> StylePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3708,13 +3750,20 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3945,13 +3994,20 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4193,13 +4249,20 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4460,13 +4523,20 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4739,13 +4809,20 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4999,13 +5076,20 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5278,13 +5362,20 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5515,13 +5606,20 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5763,13 +5861,20 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ColumnGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ColumnGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6042,13 +6147,20 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6302,13 +6414,20 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6539,13 +6658,20 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6806,13 +6932,20 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7085,13 +7218,20 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplatePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplatePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7333,13 +7473,20 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7599,13 +7746,20 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuerySqlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuerySqlGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7873,13 +8027,20 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuerySqlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuerySqlCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8152,13 +8313,20 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TablePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TablePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8264,9 +8432,9 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/{tableId}/replace", "multipart") + (self.hub._root_url.clone() + "upload/fusiontables/v2/tables/{tableId}/replace", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/{tableId}/replace", "resumable") + (self.hub._root_url.clone() + "resumable/upload/fusiontables/v2/tables/{tableId}/replace", "resumable") } else { unreachable!() }; @@ -8557,13 +8725,20 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableReplaceRowCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableReplaceRowCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8836,13 +9011,20 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9061,13 +9243,20 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9295,13 +9484,20 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9531,13 +9727,20 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9758,13 +9961,20 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9870,9 +10080,9 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/{tableId}/import", "multipart") + (self.hub._root_url.clone() + "upload/fusiontables/v2/tables/{tableId}/import", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/{tableId}/import", "resumable") + (self.hub._root_url.clone() + "resumable/upload/fusiontables/v2/tables/{tableId}/import", "resumable") } else { unreachable!() }; @@ -10163,13 +10373,20 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableImportRowCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableImportRowCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10260,9 +10477,9 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/import", "multipart") + (self.hub._root_url.clone() + "upload/fusiontables/v2/tables/import", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/import", "resumable") + (self.hub._root_url.clone() + "resumable/upload/fusiontables/v2/tables/import", "resumable") } else { unreachable!() }; @@ -10511,13 +10728,20 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableImportTableCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableImportTableCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10759,13 +10983,20 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TableCopyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TableCopyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/games1/src/lib.rs b/gen/games1/src/lib.rs index 8f4ef1cff9..dda69505a9 100644 --- a/gen/games1/src/lib.rs +++ b/gen/games1/src/lib.rs @@ -5143,13 +5143,20 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5415,13 +5422,20 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementIncrementCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementIncrementCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5675,13 +5689,20 @@ impl<'a, C, A> AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementSetStepsAtLeastCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementSetStepsAtLeastCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5921,13 +5942,20 @@ impl<'a, C, A> AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementUpdateMultipleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementUpdateMultipleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6169,13 +6197,20 @@ impl<'a, C, A> AchievementRevealCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementRevealCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementRevealCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6417,13 +6452,20 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementUnlockCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementUnlockCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6677,13 +6719,20 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LeaderboardGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6928,13 +6977,20 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LeaderboardListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7224,13 +7280,20 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetagameListCategoriesByPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetagameListCategoriesByPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7439,13 +7502,20 @@ impl<'a, C, A> MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MetagameGetMetagameConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MetagameGetMetagameConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7723,13 +7793,20 @@ impl<'a, C, A> PlayerListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlayerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlayerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7983,13 +8060,20 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlayerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlayerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8243,13 +8327,20 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuestAcceptCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestAcceptCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8527,13 +8618,20 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuestListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8787,13 +8885,20 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SnapshotGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SnapshotGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9071,13 +9176,20 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SnapshotListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SnapshotListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9308,13 +9420,20 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheDismisCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheDismisCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9583,13 +9702,20 @@ impl<'a, C, A> TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheSyncCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheSyncCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9843,13 +9969,20 @@ impl<'a, C, A> TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheDeclineCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheDeclineCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10115,13 +10248,20 @@ impl<'a, C, A> TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10373,13 +10513,20 @@ impl<'a, C, A> TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10633,13 +10780,20 @@ impl<'a, C, A> TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheJoinCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheJoinCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10917,13 +11071,20 @@ impl<'a, C, A> TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheLeaveTurnCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11154,13 +11315,20 @@ impl<'a, C, A> TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11445,13 +11613,20 @@ impl<'a, C, A> TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheFinishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheFinishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11705,13 +11880,20 @@ impl<'a, C, A> TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheLeaveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheLeaveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11980,13 +12162,20 @@ impl<'a, C, A> TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12271,13 +12460,20 @@ impl<'a, C, A> TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheTakeTurnCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheTakeTurnCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12543,13 +12739,20 @@ impl<'a, C, A> TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheRematchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheRematchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12791,13 +12994,20 @@ impl<'a, C, A> ApplicationVerifyCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ApplicationVerifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ApplicationVerifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13063,13 +13273,20 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ApplicationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ApplicationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13267,13 +13484,20 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ApplicationPlayedCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ApplicationPlayedCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13527,13 +13751,20 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13818,13 +14049,20 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomLeaveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomLeaveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14069,13 +14307,20 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14360,13 +14605,20 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomReportStatuCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomReportStatuCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14618,13 +14870,20 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14878,13 +15137,20 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomDeclineCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomDeclineCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15115,13 +15381,20 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomDismisCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomDismisCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15406,13 +15679,20 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomJoinCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomJoinCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15690,13 +15970,20 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreSubmitCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreSubmitCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15998,13 +16285,20 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16319,13 +16613,20 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16577,13 +16878,20 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ScoreSubmitMultipleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreSubmitMultipleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16909,13 +17217,20 @@ impl<'a, C, A> ScoreListWindowCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreListWindowCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreListWindowCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17144,13 +17459,20 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PushtokenRemoveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PushtokenRemoveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17379,13 +17701,20 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PushtokenUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PushtokenUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17611,13 +17940,20 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RevisionCheckCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RevisionCheckCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17862,13 +18198,20 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EventListDefinitionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventListDefinitionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18120,13 +18463,20 @@ impl<'a, C, A> EventRecordCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventRecordCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventRecordCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18371,13 +18721,20 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventListByPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventListByPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18632,13 +18989,20 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> QuestMilestoneClaimCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestMilestoneClaimCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18883,13 +19247,20 @@ impl<'a, C, A> AchievementDefinitionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementDefinitionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementDefinitionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs b/gen/gamesconfiguration1_configuration/src/lib.rs index a16e9683f3..b52ac131a9 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs +++ b/gen/gamesconfiguration1_configuration/src/lib.rs @@ -1124,9 +1124,9 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ImageConfigurationUploadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ImageConfigurationUploadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1652,13 +1659,20 @@ impl<'a, C, A> AchievementConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1919,13 +1933,20 @@ impl<'a, C, A> AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2186,13 +2207,20 @@ impl<'a, C, A> AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2422,13 +2450,20 @@ impl<'a, C, A> AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2689,13 +2724,20 @@ impl<'a, C, A> AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2914,13 +2956,20 @@ impl<'a, C, A> AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementConfigurationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementConfigurationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3181,13 +3230,20 @@ impl<'a, C, A> LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3417,13 +3473,20 @@ impl<'a, C, A> LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3684,13 +3747,20 @@ impl<'a, C, A> LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3951,13 +4021,20 @@ impl<'a, C, A> LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4211,13 +4288,20 @@ impl<'a, C, A> LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4436,13 +4520,20 @@ impl<'a, C, A> LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LeaderboardConfigurationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LeaderboardConfigurationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/gamesmanagement1_management/src/lib.rs b/gen/gamesmanagement1_management/src/lib.rs index 39b766ea49..71681e0ed9 100644 --- a/gen/gamesmanagement1_management/src/lib.rs +++ b/gen/gamesmanagement1_management/src/lib.rs @@ -1685,13 +1685,20 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementResetAllForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementResetAllForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1910,13 +1917,20 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2146,13 +2160,20 @@ impl<'a, C, A> AchievementResetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2369,13 +2390,20 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AchievementResetMultipleForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementResetMultipleForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2572,13 +2600,20 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AchievementResetAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AchievementResetAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2809,13 +2844,20 @@ impl<'a, C, A> PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlayerHideCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlayerHideCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3046,13 +3088,20 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlayerUnhideCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlayerUnhideCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3269,13 +3318,20 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ScoreResetMultipleForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreResetMultipleForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3461,13 +3517,20 @@ impl<'a, C, A> ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ScoreResetAllForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreResetAllForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3664,13 +3727,20 @@ impl<'a, C, A> ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreResetAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreResetAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3889,13 +3959,20 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ScoreResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4125,13 +4202,20 @@ impl<'a, C, A> ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ScoreResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ScoreResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4317,13 +4401,20 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TurnBasedMatcheResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4509,13 +4600,20 @@ impl<'a, C, A> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TurnBasedMatcheResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4769,13 +4867,20 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ApplicationListHiddenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ApplicationListHiddenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4961,13 +5066,20 @@ impl<'a, C, A> RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RoomResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5153,13 +5265,20 @@ impl<'a, C, A> RoomResetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RoomResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoomResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5345,13 +5464,20 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> QuestResetAllForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestResetAllForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5568,13 +5694,20 @@ impl<'a, C, A> QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> QuestResetMultipleForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestResetMultipleForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5760,13 +5893,20 @@ impl<'a, C, A> QuestResetAllCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuestResetAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestResetAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5985,13 +6125,20 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> QuestResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6210,13 +6357,20 @@ impl<'a, C, A> QuestResetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> QuestResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> QuestResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6402,13 +6556,20 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EventResetAllForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventResetAllForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6627,13 +6788,20 @@ impl<'a, C, A> EventResetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventResetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventResetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6819,13 +6987,20 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EventResetAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventResetAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7042,13 +7217,20 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EventResetMultipleForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventResetMultipleForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7267,13 +7449,20 @@ impl<'a, C, A> EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> EventResetForAllPlayerCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EventResetForAllPlayerCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/genomics1/src/lib.rs b/gen/genomics1/src/lib.rs index 0f9818e612..e6312c31e6 100644 --- a/gen/genomics1/src/lib.rs +++ b/gen/genomics1/src/lib.rs @@ -4968,13 +4968,20 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5216,13 +5223,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5516,13 +5530,20 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5760,13 +5781,20 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6011,13 +6039,20 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6290,13 +6325,20 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetUndeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetUndeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6576,13 +6618,20 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatasetSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6860,13 +6909,20 @@ impl<'a, C, A> DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatasetTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7106,13 +7162,20 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7358,13 +7421,20 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7644,13 +7714,20 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DatasetGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7938,13 +8015,20 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatasetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatasetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8185,13 +8269,20 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReferencesetSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReferencesetSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8434,13 +8525,20 @@ impl<'a, C, A> ReferencesetGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReferencesetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReferencesetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8681,13 +8779,20 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CallsetSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CallsetSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8975,13 +9080,20 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CallsetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CallsetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9219,13 +9331,20 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CallsetCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CallsetCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9465,13 +9584,20 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CallsetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CallsetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9711,13 +9837,20 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CallsetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CallsetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9974,13 +10107,20 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReadSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10257,13 +10397,20 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReadgroupsetExportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetExportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10514,13 +10661,20 @@ impl<'a, C, A> ReadgroupsetImportCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReadgroupsetImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetImportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10812,13 +10966,20 @@ impl<'a, C, A> ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReadgroupsetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11058,13 +11219,20 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReadgroupsetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11397,13 +11565,20 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReadgroupsetCoveragebucketListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetCoveragebucketListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11644,13 +11819,20 @@ impl<'a, C, A> ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReadgroupsetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11891,13 +12073,20 @@ impl<'a, C, A> ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ReadgroupsetSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReadgroupsetSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12193,13 +12382,20 @@ impl<'a, C, A> ReferenceBaseListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReferenceBaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReferenceBaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12440,13 +12636,20 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReferenceSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReferenceSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12689,13 +12892,20 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReferenceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReferenceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12936,13 +13146,20 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13182,13 +13399,20 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13428,13 +13652,20 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13758,13 +13989,20 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantMergeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantMergeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14002,13 +14240,20 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14259,13 +14504,20 @@ impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantImportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14554,13 +14806,20 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14845,13 +15104,20 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15088,13 +15354,20 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15334,13 +15607,20 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15577,13 +15857,20 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15838,13 +16125,20 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16091,13 +16385,20 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AnnotationBatchCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationBatchCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16382,13 +16683,20 @@ impl<'a, C, A> AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AnnotationsetUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationsetUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16626,13 +16934,20 @@ impl<'a, C, A> AnnotationsetSearchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AnnotationsetSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationsetSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16875,13 +17190,20 @@ impl<'a, C, A> AnnotationsetCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AnnotationsetCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationsetCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17118,13 +17440,20 @@ impl<'a, C, A> AnnotationsetDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AnnotationsetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationsetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17361,13 +17690,20 @@ impl<'a, C, A> AnnotationsetGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AnnotationsetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AnnotationsetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17609,13 +17945,20 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17856,13 +18199,20 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18134,13 +18484,20 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetExportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetExportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18430,13 +18787,20 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18677,13 +19041,20 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18923,13 +19294,20 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VariantsetGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VariantsetGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/gmail1/src/lib.rs b/gen/gmail1/src/lib.rs index 7b830c6268..43d1dc11c3 100644 --- a/gen/gmail1/src/lib.rs +++ b/gen/gmail1/src/lib.rs @@ -2920,13 +2920,20 @@ impl<'a, C, A> UserSettingUpdateVacationCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingUpdateVacationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingUpdateVacationCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3180,13 +3187,20 @@ impl<'a, C, A> UserSettingSendASmimeInfoGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendASmimeInfoGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3416,13 +3430,20 @@ impl<'a, C, A> UserSettingSendAListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendAListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendAListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3652,13 +3673,20 @@ impl<'a, C, A> UserSettingGetImapCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingGetImapCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingGetImapCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3766,9 +3794,9 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages/import", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/messages/import", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages/import", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/messages/import", "resumable") } else { unreachable!() }; @@ -4081,13 +4109,20 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageImportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4317,13 +4352,20 @@ impl<'a, C, A> UserSettingFilterListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingFilterListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingFilterListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4565,13 +4607,20 @@ impl<'a, C, A> UserSettingForwardingAddresseGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingForwardingAddresseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingForwardingAddresseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4864,13 +4913,20 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserHistoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserHistoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4958,9 +5014,9 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/drafts", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/drafts", "resumable") } else { unreachable!() }; @@ -5245,13 +5301,20 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5493,13 +5556,20 @@ impl<'a, C, A> UserSettingSendAGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendAGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendAGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5730,13 +5800,20 @@ impl<'a, C, A> UserLabelDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5978,13 +6055,20 @@ impl<'a, C, A> UserLabelGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6214,13 +6298,20 @@ impl<'a, C, A> UserLabelListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6308,9 +6399,9 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts/send", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/drafts/send", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts/send", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/drafts/send", "resumable") } else { unreachable!() }; @@ -6595,13 +6686,20 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftSendCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftSendCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6843,13 +6941,20 @@ impl<'a, C, A> UserMessageUntrashCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserMessageUntrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageUntrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7079,13 +7184,20 @@ impl<'a, C, A> UserSettingGetPopCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingGetPopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingGetPopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7346,13 +7458,20 @@ impl<'a, C, A> UserSettingUpdatePopCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingUpdatePopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingUpdatePopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7582,13 +7701,20 @@ impl<'a, C, A> UserSettingGetVacationCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingGetVacationCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingGetVacationCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7838,13 +7964,20 @@ impl<'a, C, A> UserMessageBatchDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserMessageBatchDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageBatchDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8075,13 +8208,20 @@ impl<'a, C, A> UserMessageDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8335,13 +8475,20 @@ impl<'a, C, A> UserDraftGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8431,9 +8578,9 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts/{id}", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/drafts/{id}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts/{id}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/drafts/{id}", "resumable") } else { unreachable!() }; @@ -8728,13 +8875,20 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8965,13 +9119,20 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingFilterDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingFilterDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9264,13 +9425,20 @@ impl<'a, C, A> UserThreadListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9512,13 +9680,20 @@ impl<'a, C, A> UserSettingFilterGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingFilterGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingFilterGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9768,13 +9943,20 @@ impl<'a, C, A> UserMessageBatchModifyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserMessageBatchModifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageBatchModifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10047,13 +10229,20 @@ impl<'a, C, A> UserLabelPatchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10326,13 +10515,20 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10563,13 +10759,20 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10832,13 +11035,20 @@ impl<'a, C, A> UserSettingSendACreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendACreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendACreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11101,13 +11311,20 @@ impl<'a, C, A> UserSettingUpdateAutoForwardingCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingUpdateAutoForwardingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingUpdateAutoForwardingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11368,13 +11585,20 @@ impl<'a, C, A> UserLabelCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserLabelCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserLabelCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11616,13 +11840,20 @@ impl<'a, C, A> UserThreadUntrashCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadUntrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadUntrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11864,13 +12095,20 @@ impl<'a, C, A> UserSettingSendASmimeInfoListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendASmimeInfoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12145,13 +12383,20 @@ impl<'a, C, A> UserSettingSendAPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendAPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendAPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12424,13 +12669,20 @@ impl<'a, C, A> UserThreadModifyCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadModifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadModifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12661,13 +12913,20 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12940,13 +13199,20 @@ impl<'a, C, A> UserSettingSendASmimeInfoInsertCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13200,13 +13466,20 @@ impl<'a, C, A> UserMessageAttachmentGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserMessageAttachmentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageAttachmentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13479,13 +13752,20 @@ impl<'a, C, A> UserMessageModifyCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageModifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageModifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13754,13 +14034,20 @@ impl<'a, C, A> UserMessageGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14021,13 +14308,20 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserWatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserWatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14290,13 +14584,20 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingForwardingAddresseCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingForwardingAddresseCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14574,13 +14875,20 @@ impl<'a, C, A> UserDraftListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDraftListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDraftListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14841,13 +15149,20 @@ impl<'a, C, A> UserSettingUpdateImapCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingUpdateImapCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingUpdateImapCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14935,9 +15250,9 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages/send", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/messages/send", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages/send", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/messages/send", "resumable") } else { unreachable!() }; @@ -15222,13 +15537,20 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageSendCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageSendCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15470,13 +15792,20 @@ impl<'a, C, A> UserThreadTrashCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadTrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadTrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15695,13 +16024,20 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15944,13 +16280,20 @@ impl<'a, C, A> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoSetDefaultCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16243,13 +16586,20 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16524,13 +16874,20 @@ impl<'a, C, A> UserSettingSendAUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendAUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendAUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16791,13 +17148,20 @@ impl<'a, C, A> UserSettingFilterCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingFilterCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingFilterCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17040,13 +17404,20 @@ impl<'a, C, A> UserSettingSendASmimeInfoDeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendASmimeInfoDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17288,13 +17659,20 @@ impl<'a, C, A> UserMessageTrashCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageTrashCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageTrashCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17524,13 +17902,20 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserGetProfileCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserGetProfileCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17799,13 +18184,20 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserThreadGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserThreadGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18038,13 +18430,20 @@ impl<'a, C, A> UserSettingSendAVerifyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendAVerifyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendAVerifyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18274,13 +18673,20 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingForwardingAddresseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingForwardingAddresseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18378,9 +18784,9 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages", "multipart") + (self.hub._root_url.clone() + "upload/gmail/v1/users/{userId}/messages", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages", "resumable") + (self.hub._root_url.clone() + "resumable/upload/gmail/v1/users/{userId}/messages", "resumable") } else { unreachable!() }; @@ -18679,13 +19085,20 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserMessageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserMessageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18915,13 +19328,20 @@ impl<'a, C, A> UserSettingGetAutoForwardingCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingGetAutoForwardingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingGetAutoForwardingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19154,13 +19574,20 @@ impl<'a, C, A> UserSettingSendADeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UserSettingSendADeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingSendADeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19393,13 +19820,20 @@ impl<'a, C, A> UserSettingForwardingAddresseDeleteCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserSettingForwardingAddresseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserSettingForwardingAddresseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/groupsmigration1/src/lib.rs b/gen/groupsmigration1/src/lib.rs index 3e6a91dec8..ff19f5c3f0 100644 --- a/gen/groupsmigration1/src/lib.rs +++ b/gen/groupsmigration1/src/lib.rs @@ -522,9 +522,9 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/groups/v1/groups/{groupId}/archive", "multipart") + (self.hub._root_url.clone() + "upload/groups/v1/groups/{groupId}/archive", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/groups/v1/groups/{groupId}/archive", "resumable") + (self.hub._root_url.clone() + "resumable/upload/groups/v1/groups/{groupId}/archive", "resumable") } else { unreachable!() }; @@ -780,13 +780,20 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ArchiveInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ArchiveInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/groupssettings1/src/lib.rs b/gen/groupssettings1/src/lib.rs index 47feca0ee4..9dfddcbf8f 100644 --- a/gen/groupssettings1/src/lib.rs +++ b/gen/groupssettings1/src/lib.rs @@ -835,13 +835,20 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1102,13 +1109,20 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1338,13 +1352,20 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/iam1/src/lib.rs b/gen/iam1/src/lib.rs index 484683f0dd..82bfd952d7 100644 --- a/gen/iam1/src/lib.rs +++ b/gen/iam1/src/lib.rs @@ -1595,13 +1595,20 @@ impl<'a, C, A> RoleQueryGrantableRoleCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RoleQueryGrantableRoleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RoleQueryGrantableRoleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1863,13 +1870,20 @@ impl<'a, C, A> ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountKeyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountKeyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2142,13 +2156,20 @@ impl<'a, C, A> ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectServiceAccountSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2392,13 +2413,20 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountKeyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountKeyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2674,13 +2702,20 @@ impl<'a, C, A> ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountKeyCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountKeyCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2955,13 +2990,20 @@ impl<'a, C, A> ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountSignBlobCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountSignBlobCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3244,13 +3286,20 @@ impl<'a, C, A> ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3519,13 +3568,20 @@ impl<'a, C, A> ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3769,13 +3825,20 @@ impl<'a, C, A> ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4034,13 +4097,20 @@ impl<'a, C, A> ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountKeyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountKeyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4282,13 +4352,20 @@ impl<'a, C, A> ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectServiceAccountGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4561,13 +4638,20 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectServiceAccountTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4840,13 +4924,20 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5125,13 +5216,20 @@ impl<'a, C, A> ProjectServiceAccountSignJwtCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountSignJwtCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountSignJwtCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5375,13 +5473,20 @@ impl<'a, C, A> ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/identitytoolkit3/src/lib.rs b/gen/identitytoolkit3/src/lib.rs index 754c2f8f47..6b00850c0f 100644 --- a/gen/identitytoolkit3/src/lib.rs +++ b/gen/identitytoolkit3/src/lib.rs @@ -2265,13 +2265,20 @@ impl<'a, C, A> RelyingpartyGetOobConfirmationCodeCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RelyingpartyGetOobConfirmationCodeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyGetOobConfirmationCodeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2499,13 +2506,20 @@ impl<'a, C, A> RelyingpartySignupNewUserCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartySignupNewUserCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartySignupNewUserCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2733,13 +2747,20 @@ impl<'a, C, A> RelyingpartyCreateAuthUriCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyCreateAuthUriCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyCreateAuthUriCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2967,13 +2988,20 @@ impl<'a, C, A> RelyingpartySignOutUserCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartySignOutUserCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartySignOutUserCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3201,13 +3229,20 @@ impl<'a, C, A> RelyingpartyVerifyAssertionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyVerifyAssertionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyVerifyAssertionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3435,13 +3470,20 @@ impl<'a, C, A> RelyingpartyUploadAccountCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyUploadAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyUploadAccountCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3669,13 +3711,20 @@ impl<'a, C, A> RelyingpartyGetAccountInfoCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyGetAccountInfoCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyGetAccountInfoCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3903,13 +3952,20 @@ impl<'a, C, A> RelyingpartyVerifyCustomTokenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyVerifyCustomTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyVerifyCustomTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4137,13 +4193,20 @@ impl<'a, C, A> RelyingpartyResetPasswordCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyResetPasswordCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyResetPasswordCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4371,13 +4434,20 @@ impl<'a, C, A> RelyingpartyDownloadAccountCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyDownloadAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyDownloadAccountCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4605,13 +4675,20 @@ impl<'a, C, A> RelyingpartySetAccountInfoCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartySetAccountInfoCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartySetAccountInfoCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4839,13 +4916,20 @@ impl<'a, C, A> RelyingpartyDeleteAccountCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyDeleteAccountCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyDeleteAccountCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5042,13 +5126,20 @@ impl<'a, C, A> RelyingpartyGetPublicKeyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyGetPublicKeyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyGetPublicKeyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5245,13 +5336,20 @@ impl<'a, C, A> RelyingpartyGetRecaptchaParamCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyGetRecaptchaParamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyGetRecaptchaParamCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5479,13 +5577,20 @@ impl<'a, C, A> RelyingpartyVerifyPasswordCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyVerifyPasswordCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyVerifyPasswordCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5713,13 +5818,20 @@ impl<'a, C, A> RelyingpartySetProjectConfigCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartySetProjectConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartySetProjectConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5940,13 +6052,20 @@ impl<'a, C, A> RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RelyingpartyGetProjectConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RelyingpartyGetProjectConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/licensing1/src/lib.rs b/gen/licensing1/src/lib.rs index e904ecc0ac..c77b05d44d 100644 --- a/gen/licensing1/src/lib.rs +++ b/gen/licensing1/src/lib.rs @@ -894,13 +894,20 @@ impl<'a, C, A> LicenseAssignmentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LicenseAssignmentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1166,13 +1173,20 @@ impl<'a, C, A> LicenseAssignmentListForProductCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LicenseAssignmentListForProductCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentListForProductCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1426,13 +1440,20 @@ impl<'a, C, A> LicenseAssignmentGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LicenseAssignmentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1710,13 +1731,20 @@ impl<'a, C, A> LicenseAssignmentListForProductAndSkuCall<'a, C, A> where C: Borr /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LicenseAssignmentListForProductAndSkuCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentListForProductAndSkuCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2001,13 +2029,20 @@ impl<'a, C, A> LicenseAssignmentUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LicenseAssignmentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2292,13 +2327,20 @@ impl<'a, C, A> LicenseAssignmentPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LicenseAssignmentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2571,13 +2613,20 @@ impl<'a, C, A> LicenseAssignmentInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LicenseAssignmentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LicenseAssignmentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/logging2/src/lib.rs b/gen/logging2/src/lib.rs index 4f178f250b..964538f9c8 100644 --- a/gen/logging2/src/lib.rs +++ b/gen/logging2/src/lib.rs @@ -2268,13 +2268,20 @@ impl<'a, C, A> FolderSinkListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderSinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2565,13 +2572,20 @@ impl<'a, C, A> FolderSinkUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderSinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2816,13 +2830,20 @@ impl<'a, C, A> FolderSinkGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderSinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3110,13 +3131,20 @@ impl<'a, C, A> FolderSinkCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderSinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3361,13 +3389,20 @@ impl<'a, C, A> FolderSinkDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderSinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderSinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3636,13 +3671,20 @@ impl<'a, C, A> FolderLogListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3887,13 +3929,20 @@ impl<'a, C, A> FolderLogDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FolderLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FolderLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4162,13 +4211,20 @@ impl<'a, C, A> OrganizationLogListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4413,13 +4469,20 @@ impl<'a, C, A> OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4710,13 +4773,20 @@ impl<'a, C, A> OrganizationSinkUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4961,13 +5031,20 @@ impl<'a, C, A> OrganizationSinkGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5236,13 +5313,20 @@ impl<'a, C, A> OrganizationSinkListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5487,13 +5571,20 @@ impl<'a, C, A> OrganizationSinkDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5781,13 +5872,20 @@ impl<'a, C, A> OrganizationSinkCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationSinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationSinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6021,13 +6119,20 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntryWriteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntryWriteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6261,13 +6366,20 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6555,13 +6667,20 @@ impl<'a, C, A> BillingAccountSinkCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountSinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountSinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6830,13 +6949,20 @@ impl<'a, C, A> BillingAccountLogListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7105,13 +7231,20 @@ impl<'a, C, A> BillingAccountSinkListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountSinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountSinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7356,13 +7489,20 @@ impl<'a, C, A> BillingAccountSinkDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountSinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountSinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7607,13 +7747,20 @@ impl<'a, C, A> BillingAccountSinkGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountSinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountSinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7904,13 +8051,20 @@ impl<'a, C, A> BillingAccountSinkUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountSinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountSinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8155,13 +8309,20 @@ impl<'a, C, A> BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8388,13 +8549,20 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MonitoredResourceDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MonitoredResourceDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8639,13 +8807,20 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8887,13 +9062,20 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMetricGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9162,13 +9344,20 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9441,13 +9630,20 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9713,13 +9909,20 @@ impl<'a, C, A> ProjectMetricListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMetricListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10010,13 +10213,20 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10285,13 +10495,20 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10536,13 +10753,20 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10787,13 +11011,20 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11081,13 +11312,20 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11360,13 +11598,20 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11608,13 +11853,20 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/logging2_beta1/src/lib.rs b/gen/logging2_beta1/src/lib.rs index c7b5f376dc..670e449b58 100644 --- a/gen/logging2_beta1/src/lib.rs +++ b/gen/logging2_beta1/src/lib.rs @@ -1759,13 +1759,20 @@ impl<'a, C, A> OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2034,13 +2041,20 @@ impl<'a, C, A> OrganizationLogListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> OrganizationLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OrganizationLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2285,13 +2299,20 @@ impl<'a, C, A> BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2560,13 +2581,20 @@ impl<'a, C, A> BillingAccountLogListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BillingAccountLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BillingAccountLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2793,13 +2821,20 @@ impl<'a, C, A> MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MonitoredResourceDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MonitoredResourceDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3041,13 +3076,20 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMetricGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3292,13 +3334,20 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLogDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLogDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3567,13 +3616,20 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3818,13 +3874,20 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4097,13 +4160,20 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4394,13 +4464,20 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4669,13 +4746,20 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectLogListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectLogListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4917,13 +5001,20 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5211,13 +5302,20 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5490,13 +5588,20 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5762,13 +5867,20 @@ impl<'a, C, A> ProjectMetricListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMetricListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6013,13 +6125,20 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSinkDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSinkDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6253,13 +6372,20 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6493,13 +6619,20 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EntryWriteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EntryWriteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/manager1_beta2/src/lib.rs b/gen/manager1_beta2/src/lib.rs index ba11c2bb20..dcf000b0c0 100644 --- a/gen/manager1_beta2/src/lib.rs +++ b/gen/manager1_beta2/src/lib.rs @@ -1636,13 +1636,20 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1871,13 +1878,20 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2137,13 +2151,20 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2383,13 +2404,20 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TemplateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TemplateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2660,13 +2688,20 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2917,13 +2952,20 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3187,13 +3229,20 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3433,13 +3482,20 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DeploymentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DeploymentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/manufacturers1/src/lib.rs b/gen/manufacturers1/src/lib.rs index 78cce3ee5d..93d3c1c2dc 100644 --- a/gen/manufacturers1/src/lib.rs +++ b/gen/manufacturers1/src/lib.rs @@ -1062,13 +1062,20 @@ impl<'a, C, A> AccountProductListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountProductListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountProductListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1332,13 +1339,20 @@ impl<'a, C, A> AccountProductGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountProductGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountProductGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/mirror1/src/lib.rs b/gen/mirror1/src/lib.rs index 0ab8de99d3..3c3a955001 100644 --- a/gen/mirror1/src/lib.rs +++ b/gen/mirror1/src/lib.rs @@ -1932,13 +1932,20 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2157,13 +2164,20 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2424,13 +2438,20 @@ impl<'a, C, A> SubscriptionUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2627,13 +2648,20 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2863,13 +2891,20 @@ impl<'a, C, A> TimelineAttachmentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TimelineAttachmentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineAttachmentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2955,9 +2990,9 @@ impl<'a, C, A> TimelineInsertCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/mirror/v1/timeline", "multipart") + (self.hub._root_url.clone() + "upload/mirror/v1/timeline", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/mirror/v1/timeline", "resumable") + (self.hub._root_url.clone() + "resumable/upload/mirror/v1/timeline", "resumable") } else { unreachable!() }; @@ -3211,13 +3246,20 @@ impl<'a, C, A> TimelineInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelineInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3478,13 +3520,20 @@ impl<'a, C, A> TimelinePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelinePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelinePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3765,13 +3814,20 @@ impl<'a, C, A> TimelineListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelineListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3852,9 +3908,9 @@ impl<'a, C, A> TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TimelineAttachmentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineAttachmentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4347,13 +4410,20 @@ impl<'a, C, A> TimelineAttachmentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TimelineAttachmentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineAttachmentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4572,13 +4642,20 @@ impl<'a, C, A> TimelineDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelineDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4666,9 +4743,9 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/mirror/v1/timeline/{id}", "multipart") + (self.hub._root_url.clone() + "upload/mirror/v1/timeline/{id}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/mirror/v1/timeline/{id}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/mirror/v1/timeline/{id}", "resumable") } else { unreachable!() }; @@ -4953,13 +5030,20 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelineUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5222,13 +5306,20 @@ impl<'a, C, A> TimelineAttachmentGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TimelineAttachmentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineAttachmentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5458,13 +5549,20 @@ impl<'a, C, A> TimelineGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TimelineGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TimelineGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5696,13 +5794,20 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SettingGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SettingGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5932,13 +6037,20 @@ impl<'a, C, A> LocationGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LocationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LocationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6135,13 +6247,20 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LocationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LocationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6640,13 +6759,20 @@ impl<'a, C, A> ContactGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6865,13 +6991,20 @@ impl<'a, C, A> ContactDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7099,13 +7232,20 @@ impl<'a, C, A> ContactInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7366,13 +7506,20 @@ impl<'a, C, A> ContactPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7569,13 +7716,20 @@ impl<'a, C, A> ContactListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7836,13 +7990,20 @@ impl<'a, C, A> ContactUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ContactUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ContactUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/ml1_beta1/src/lib.rs b/gen/ml1_beta1/src/lib.rs index 18c38ecf42..1d95d7a92d 100644 --- a/gen/ml1_beta1/src/lib.rs +++ b/gen/ml1_beta1/src/lib.rs @@ -2195,13 +2195,20 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2444,13 +2451,20 @@ impl<'a, C, A> ProjectOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectOperationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectOperationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2730,13 +2744,20 @@ impl<'a, C, A> ProjectModelVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3013,13 +3034,20 @@ impl<'a, C, A> ProjectModelVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3261,13 +3289,20 @@ impl<'a, C, A> ProjectOperationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3517,13 +3552,20 @@ impl<'a, C, A> ProjectModelVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3796,13 +3838,20 @@ impl<'a, C, A> ProjectJobCreateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectJobCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectJobCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4048,13 +4097,20 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4329,13 +4385,20 @@ impl<'a, C, A> ProjectPredictCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectPredictCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectPredictCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4582,13 +4645,20 @@ impl<'a, C, A> ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4833,13 +4903,20 @@ impl<'a, C, A> ProjectGetConfigCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGetConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGetConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5081,13 +5158,20 @@ impl<'a, C, A> ProjectJobGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectJobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectJobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5336,13 +5420,20 @@ impl<'a, C, A> ProjectOperationCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectOperationCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectOperationCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5619,13 +5710,20 @@ impl<'a, C, A> ProjectModelCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5907,13 +6005,20 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelVersionSetDefaultCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6198,13 +6303,20 @@ impl<'a, C, A> ProjectJobListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectJobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectJobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6477,13 +6589,20 @@ impl<'a, C, A> ProjectJobCancelCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectJobCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectJobCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6727,13 +6846,20 @@ impl<'a, C, A> ProjectModelGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectModelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7009,13 +7135,20 @@ impl<'a, C, A> ProjectModelListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectModelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectModelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/monitoring3/src/lib.rs b/gen/monitoring3/src/lib.rs index ecc5f2f5c1..2dfa36b5ca 100644 --- a/gen/monitoring3/src/lib.rs +++ b/gen/monitoring3/src/lib.rs @@ -1575,13 +1575,20 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1864,13 +1871,20 @@ impl<'a, C, A> ProjectGroupCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGroupCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2110,13 +2124,20 @@ impl<'a, C, A> ProjectGroupGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGroupGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2356,13 +2377,20 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2633,13 +2661,20 @@ impl<'a, C, A> ProjectCollectdTimeSeryCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectCollectdTimeSeryCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2941,13 +2976,20 @@ impl<'a, C, A> ProjectGroupMemberListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGroupMemberListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupMemberListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3225,13 +3267,20 @@ impl<'a, C, A> ProjectMonitoredResourceDescriptorListCall<'a, C, A> where C: Bor /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMonitoredResourceDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3502,13 +3551,20 @@ impl<'a, C, A> ProjectTimeSeryCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTimeSeryCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTimeSeryCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3779,13 +3835,20 @@ impl<'a, C, A> ProjectMetricDescriptorCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4085,13 +4148,20 @@ impl<'a, C, A> ProjectGroupListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectGroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4369,13 +4439,20 @@ impl<'a, C, A> ProjectMetricDescriptorListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectMetricDescriptorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMetricDescriptorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4615,13 +4692,20 @@ impl<'a, C, A> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> where C: Borr /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectMonitoredResourceDescriptorGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4904,13 +4988,20 @@ impl<'a, C, A> ProjectGroupUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5150,13 +5241,20 @@ impl<'a, C, A> ProjectGroupDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectGroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectGroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5534,13 +5632,20 @@ impl<'a, C, A> ProjectTimeSeryListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTimeSeryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTimeSeryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/people1/src/lib.rs b/gen/people1/src/lib.rs index 75ed30a8a9..84e75eaf9a 100644 --- a/gen/people1/src/lib.rs +++ b/gen/people1/src/lib.rs @@ -1835,13 +1835,20 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2163,13 +2170,20 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PeopleConnectionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleConnectionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2409,13 +2423,20 @@ impl<'a, C, A> PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleGetBatchGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleGetBatchGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/playmoviespartner1/src/lib.rs b/gen/playmoviespartner1/src/lib.rs index 4f05a42401..e1ce767fbf 100644 --- a/gen/playmoviespartner1/src/lib.rs +++ b/gen/playmoviespartner1/src/lib.rs @@ -1387,13 +1387,20 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountOrderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountOrderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1656,13 +1663,20 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountStoreInfoCountryGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountStoreInfoCountryGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1913,13 +1927,20 @@ impl<'a, C, A> AccountOrderGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountOrderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountOrderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2167,13 +2188,20 @@ impl<'a, C, A> AccountAvailGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAvailGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAvailGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2541,13 +2569,20 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountAvailListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountAvailListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2928,13 +2963,20 @@ impl<'a, C, A> AccountStoreInfoListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountStoreInfoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountStoreInfoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/plus1/src/lib.rs b/gen/plus1/src/lib.rs index 76fc7876b3..41ff854178 100644 --- a/gen/plus1/src/lib.rs +++ b/gen/plus1/src/lib.rs @@ -2134,13 +2134,20 @@ impl<'a, C, A> ActivitySearchCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivitySearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivitySearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2370,13 +2377,20 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2642,13 +2656,20 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2914,13 +2935,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3150,13 +3178,20 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3401,13 +3436,20 @@ impl<'a, C, A> PeopleSearchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleSearchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleSearchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3673,13 +3715,20 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PeopleListByActivityCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleListByActivityCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3957,13 +4006,20 @@ impl<'a, C, A> PeopleListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4193,13 +4249,20 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/plusdomains1/src/lib.rs b/gen/plusdomains1/src/lib.rs index 861d2b79ad..b7d8897673 100644 --- a/gen/plusdomains1/src/lib.rs +++ b/gen/plusdomains1/src/lib.rs @@ -2814,13 +2814,20 @@ impl<'a, C, A> CircleRemovePeopleCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CircleRemovePeopleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleRemovePeopleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3081,13 +3088,20 @@ impl<'a, C, A> CircleInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3347,13 +3361,20 @@ impl<'a, C, A> CircleAddPeopleCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleAddPeopleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleAddPeopleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3583,13 +3604,20 @@ impl<'a, C, A> CircleGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3843,13 +3871,20 @@ impl<'a, C, A> CircleListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4110,13 +4145,20 @@ impl<'a, C, A> CircleUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4377,13 +4419,20 @@ impl<'a, C, A> CirclePatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CirclePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CirclePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4602,13 +4651,20 @@ impl<'a, C, A> CircleRemoveCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CircleRemoveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CircleRemoveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4881,13 +4937,20 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5117,13 +5180,20 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5389,13 +5459,20 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5649,13 +5726,20 @@ impl<'a, C, A> PeopleListByCircleCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PeopleListByCircleCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleListByCircleCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5933,13 +6017,20 @@ impl<'a, C, A> PeopleListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6169,13 +6260,20 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PeopleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6441,13 +6539,20 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PeopleListByActivityCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PeopleListByActivityCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6537,9 +6642,9 @@ impl<'a, C, A> MediaInsertCall<'a, C, A> where C: BorrowMut, A: o let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/plusDomains/v1/people/{userId}/media/{collection}", "multipart") + (self.hub._root_url.clone() + "upload/plusDomains/v1/people/{userId}/media/{collection}", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}", "resumable") + (self.hub._root_url.clone() + "resumable/upload/plusDomains/v1/people/{userId}/media/{collection}", "resumable") } else { unreachable!() }; @@ -6829,13 +6934,20 @@ impl<'a, C, A> MediaInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MediaInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MediaInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7096,13 +7208,20 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7368,13 +7487,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7604,13 +7730,20 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7864,13 +7997,20 @@ impl<'a, C, A> AudienceListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AudienceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AudienceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/prediction1d6/src/lib.rs b/gen/prediction1d6/src/lib.rs index fbb02ebb85..6c2227ee6c 100644 --- a/gen/prediction1d6/src/lib.rs +++ b/gen/prediction1d6/src/lib.rs @@ -1339,13 +1339,20 @@ impl<'a, C, A> TrainedmodelGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TrainedmodelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1618,13 +1625,20 @@ impl<'a, C, A> TrainedmodelUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TrainedmodelUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1878,13 +1892,20 @@ impl<'a, C, A> TrainedmodelListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TrainedmodelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2115,13 +2136,20 @@ impl<'a, C, A> TrainedmodelDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TrainedmodelDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2382,13 +2410,20 @@ impl<'a, C, A> TrainedmodelInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TrainedmodelInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2630,13 +2665,20 @@ impl<'a, C, A> TrainedmodelAnalyzeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TrainedmodelAnalyzeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelAnalyzeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2909,13 +2951,20 @@ impl<'a, C, A> TrainedmodelPredictCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TrainedmodelPredictCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TrainedmodelPredictCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3188,13 +3237,20 @@ impl<'a, C, A> HostedmodelPredictCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> HostedmodelPredictCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> HostedmodelPredictCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/proximitybeacon1_beta1/src/lib.rs b/gen/proximitybeacon1_beta1/src/lib.rs index 2570eedf2b..bd27c04b3d 100644 --- a/gen/proximitybeacon1_beta1/src/lib.rs +++ b/gen/proximitybeacon1_beta1/src/lib.rs @@ -1976,13 +1976,20 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconAttachmentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconAttachmentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2253,13 +2260,20 @@ impl<'a, C, A> BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2566,13 +2580,20 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconAttachmentCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconAttachmentCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2840,13 +2861,20 @@ impl<'a, C, A> BeaconDecommissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconDecommissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconDecommissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3114,13 +3142,20 @@ impl<'a, C, A> BeaconActivateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconActivateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconActivateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3446,13 +3481,20 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3754,13 +3796,20 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4027,13 +4076,20 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconAttachmentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconAttachmentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4301,13 +4357,20 @@ impl<'a, C, A> BeaconDeactivateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconDeactivateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconDeactivateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4561,13 +4624,20 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconRegisterCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconRegisterCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4833,13 +4903,20 @@ impl<'a, C, A> BeaconDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BeaconDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5138,13 +5215,20 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconDiagnosticListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconDiagnosticListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5432,13 +5516,20 @@ impl<'a, C, A> BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BeaconAttachmentBatchDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BeaconAttachmentBatchDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5868,13 +5959,20 @@ impl<'a, C, A> MethodGetEidparamCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MethodGetEidparamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MethodGetEidparamCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6096,13 +6194,20 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NamespaceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NamespaceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6390,13 +6495,20 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NamespaceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NamespaceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/pubsub1/src/lib.rs b/gen/pubsub1/src/lib.rs index 3071b73871..f7eb7275a5 100644 --- a/gen/pubsub1/src/lib.rs +++ b/gen/pubsub1/src/lib.rs @@ -1794,13 +1794,20 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2076,13 +2083,20 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2360,13 +2374,20 @@ impl<'a, C, A> ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2644,13 +2665,20 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2928,13 +2956,20 @@ impl<'a, C, A> ProjectSnapshotTestIamPermissionCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSnapshotTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSnapshotTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3209,13 +3244,20 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionPullCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionPullCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3492,13 +3534,20 @@ impl<'a, C, A> ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionModifyPushConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionModifyPushConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3741,13 +3790,20 @@ impl<'a, C, A> ProjectSnapshotGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSnapshotGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSnapshotGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4023,13 +4079,20 @@ impl<'a, C, A> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4272,13 +4335,20 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4556,13 +4626,20 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionAcknowledgeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionAcknowledgeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4807,13 +4884,20 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5056,13 +5140,20 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5329,13 +5420,20 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectTopicListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5609,13 +5707,20 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicPublishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicPublishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5856,13 +5961,20 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectTopicGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6135,13 +6247,20 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6386,13 +6505,20 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6677,13 +6803,20 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6956,13 +7089,20 @@ impl<'a, C, A> ProjectSnapshotSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSnapshotSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSnapshotSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7203,13 +7343,20 @@ impl<'a, C, A> ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7476,13 +7623,20 @@ impl<'a, C, A> ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicSubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicSubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7755,13 +7909,20 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/pubsub1_beta2/src/lib.rs b/gen/pubsub1_beta2/src/lib.rs index 37167218c3..72e8ec6205 100644 --- a/gen/pubsub1_beta2/src/lib.rs +++ b/gen/pubsub1_beta2/src/lib.rs @@ -1706,13 +1706,20 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectTopicListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1986,13 +1993,20 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionPullCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionPullCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2268,13 +2282,20 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2552,13 +2573,20 @@ impl<'a, C, A> ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2834,13 +2862,20 @@ impl<'a, C, A> ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionModifyPushConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionModifyPushConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3113,13 +3148,20 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicPublishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicPublishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3359,13 +3401,20 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectTopicGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3608,13 +3657,20 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3889,13 +3945,20 @@ impl<'a, C, A> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4139,13 +4202,20 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4418,13 +4488,20 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4706,13 +4783,20 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4989,13 +5073,20 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionAcknowledgeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionAcknowledgeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5238,13 +5329,20 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5522,13 +5620,20 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5772,13 +5877,20 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6018,13 +6130,20 @@ impl<'a, C, A> ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6290,13 +6409,20 @@ impl<'a, C, A> ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectTopicSubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectTopicSubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6562,13 +6688,20 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectSubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6841,13 +6974,20 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/replicapool1_beta2/src/lib.rs b/gen/replicapool1_beta2/src/lib.rs index 1d8a679caf..e8a07fbf34 100644 --- a/gen/replicapool1_beta2/src/lib.rs +++ b/gen/replicapool1_beta2/src/lib.rs @@ -1397,13 +1397,20 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1657,13 +1664,20 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1948,13 +1962,20 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGroupManagerSetTargetPoolCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerSetTargetPoolCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2232,13 +2253,20 @@ impl<'a, C, A> InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceGroupManagerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2523,13 +2551,20 @@ impl<'a, C, A> InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceGroupManagerInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2783,13 +2818,20 @@ impl<'a, C, A> InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceGroupManagerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3074,13 +3116,20 @@ impl<'a, C, A> InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGroupManagerAbandonInstanceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerAbandonInstanceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3365,13 +3414,20 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGroupManagerRecreateInstanceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerRecreateInstanceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3625,13 +3681,20 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceGroupManagerDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3916,13 +3979,20 @@ impl<'a, C, A> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4188,13 +4258,20 @@ impl<'a, C, A> InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceGroupManagerResizeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerResizeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4479,13 +4556,20 @@ impl<'a, C, A> InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGroupManagerDeleteInstanceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGroupManagerDeleteInstanceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/replicapoolupdater1_beta1/src/lib.rs b/gen/replicapoolupdater1_beta1/src/lib.rs index 7b466c733b..254daf851f 100644 --- a/gen/replicapoolupdater1_beta1/src/lib.rs +++ b/gen/replicapoolupdater1_beta1/src/lib.rs @@ -1347,13 +1347,20 @@ impl<'a, C, A> RollingUpdatePauseCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RollingUpdatePauseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdatePauseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1607,13 +1614,20 @@ impl<'a, C, A> RollingUpdateRollbackCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RollingUpdateRollbackCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateRollbackCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1867,13 +1881,20 @@ impl<'a, C, A> RollingUpdateGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RollingUpdateGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2127,13 +2148,20 @@ impl<'a, C, A> RollingUpdateResumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RollingUpdateResumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateResumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2411,13 +2439,20 @@ impl<'a, C, A> RollingUpdateListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RollingUpdateListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2690,13 +2725,20 @@ impl<'a, C, A> RollingUpdateInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RollingUpdateInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2986,13 +3028,20 @@ impl<'a, C, A> RollingUpdateListInstanceUpdateCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> RollingUpdateListInstanceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateListInstanceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3246,13 +3295,20 @@ impl<'a, C, A> RollingUpdateCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> RollingUpdateCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> RollingUpdateCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3506,13 +3562,20 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3790,13 +3853,20 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/reseller1_sandbox/src/lib.rs b/gen/reseller1_sandbox/src/lib.rs index cbcdd5d271..099ee1a250 100644 --- a/gen/reseller1_sandbox/src/lib.rs +++ b/gen/reseller1_sandbox/src/lib.rs @@ -1334,13 +1334,20 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1580,13 +1587,20 @@ impl<'a, C, A> CustomerInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1847,13 +1861,20 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2083,13 +2104,20 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CustomerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CustomerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2362,13 +2390,20 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2611,13 +2646,20 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2859,13 +2901,20 @@ impl<'a, C, A> SubscriptionGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubscriptionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3122,13 +3171,20 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3401,13 +3457,20 @@ impl<'a, C, A> SubscriptionChangeRenewalSettingCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubscriptionChangeRenewalSettingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionChangeRenewalSettingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3649,13 +3712,20 @@ impl<'a, C, A> SubscriptionStartPaidServiceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionStartPaidServiceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionStartPaidServiceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3928,13 +3998,20 @@ impl<'a, C, A> SubscriptionChangeSeatCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionChangeSeatCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionChangeSeatCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4176,13 +4253,20 @@ impl<'a, C, A> SubscriptionSuspendCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionSuspendCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionSuspendCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4424,13 +4508,20 @@ impl<'a, C, A> SubscriptionActivateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionActivateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionActivateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4703,13 +4794,20 @@ impl<'a, C, A> SubscriptionChangePlanCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionChangePlanCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionChangePlanCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/resourceviews1_beta2/src/lib.rs b/gen/resourceviews1_beta2/src/lib.rs index d80866e460..c6217d9f1d 100644 --- a/gen/resourceviews1_beta2/src/lib.rs +++ b/gen/resourceviews1_beta2/src/lib.rs @@ -1398,13 +1398,20 @@ impl<'a, C, A> ZoneViewRemoveResourceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneViewRemoveResourceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewRemoveResourceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1689,13 +1696,20 @@ impl<'a, C, A> ZoneViewAddResourceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneViewAddResourceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewAddResourceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2009,13 +2023,20 @@ impl<'a, C, A> ZoneViewListResourceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneViewListResourceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewListResourceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2269,13 +2290,20 @@ impl<'a, C, A> ZoneViewGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneViewGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2541,13 +2569,20 @@ impl<'a, C, A> ZoneViewListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneViewListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2820,13 +2855,20 @@ impl<'a, C, A> ZoneViewInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneViewInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3080,13 +3122,20 @@ impl<'a, C, A> ZoneViewDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneViewDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3371,13 +3420,20 @@ impl<'a, C, A> ZoneViewSetServiceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneViewSetServiceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewSetServiceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3643,13 +3699,20 @@ impl<'a, C, A> ZoneViewGetServiceCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ZoneViewGetServiceCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneViewGetServiceCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3903,13 +3966,20 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4187,13 +4257,20 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ZoneOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ZoneOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/serviceregistryalpha/src/lib.rs b/gen/serviceregistryalpha/src/lib.rs index 5bddf232d6..a293c05d0b 100644 --- a/gen/serviceregistryalpha/src/lib.rs +++ b/gen/serviceregistryalpha/src/lib.rs @@ -1119,13 +1119,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1415,13 +1422,20 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1682,13 +1696,20 @@ impl<'a, C, A> EndpointInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1930,13 +1951,20 @@ impl<'a, C, A> EndpointDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2209,13 +2237,20 @@ impl<'a, C, A> EndpointUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2488,13 +2523,20 @@ impl<'a, C, A> EndpointPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2784,13 +2826,20 @@ impl<'a, C, A> EndpointListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3032,13 +3081,20 @@ impl<'a, C, A> EndpointGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> EndpointGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> EndpointGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/siteverification1/src/lib.rs b/gen/siteverification1/src/lib.rs index ad0da389b2..d04d57b98c 100644 --- a/gen/siteverification1/src/lib.rs +++ b/gen/siteverification1/src/lib.rs @@ -885,13 +885,20 @@ impl<'a, C, A> WebResourceGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1152,13 +1159,20 @@ impl<'a, C, A> WebResourcePatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourcePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourcePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1355,13 +1369,20 @@ impl<'a, C, A> WebResourceListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1580,13 +1601,20 @@ impl<'a, C, A> WebResourceDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1814,13 +1842,20 @@ impl<'a, C, A> WebResourceGetTokenCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> WebResourceGetTokenCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceGetTokenCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2081,13 +2116,20 @@ impl<'a, C, A> WebResourceUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2327,13 +2369,20 @@ impl<'a, C, A> WebResourceInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WebResourceInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WebResourceInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/sqladmin1_beta4/src/lib.rs b/gen/sqladmin1_beta4/src/lib.rs index 1c66a6ce86..eeb80e342f 100644 --- a/gen/sqladmin1_beta4/src/lib.rs +++ b/gen/sqladmin1_beta4/src/lib.rs @@ -3163,13 +3163,20 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3411,13 +3418,20 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> OperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> OperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3647,13 +3661,20 @@ impl<'a, C, A> TierListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TierListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TierListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3895,13 +3916,20 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4167,13 +4195,20 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4470,13 +4505,20 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4749,13 +4791,20 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UserInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UserInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5028,13 +5077,20 @@ impl<'a, C, A> InstanceTruncateLogCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceTruncateLogCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceTruncateLogCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5307,13 +5363,20 @@ impl<'a, C, A> InstanceFailoverCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceFailoverCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceFailoverCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5555,13 +5618,20 @@ impl<'a, C, A> InstanceResetSslConfigCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceResetSslConfigCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceResetSslConfigCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5803,13 +5873,20 @@ impl<'a, C, A> InstancePromoteReplicaCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstancePromoteReplicaCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstancePromoteReplicaCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6051,13 +6128,20 @@ impl<'a, C, A> InstanceGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6330,13 +6414,20 @@ impl<'a, C, A> InstancePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstancePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstancePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6609,13 +6700,20 @@ impl<'a, C, A> InstanceCloneCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceCloneCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceCloneCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6857,13 +6955,20 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7105,13 +7210,20 @@ impl<'a, C, A> InstanceStopReplicaCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceStopReplicaCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceStopReplicaCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7353,13 +7465,20 @@ impl<'a, C, A> InstanceStartReplicaCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceStartReplicaCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceStartReplicaCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7620,13 +7739,20 @@ impl<'a, C, A> InstanceInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7892,13 +8018,20 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8171,13 +8304,20 @@ impl<'a, C, A> InstanceImportCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceImportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceImportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8450,13 +8590,20 @@ impl<'a, C, A> InstanceUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8698,13 +8845,20 @@ impl<'a, C, A> InstanceRestartCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceRestartCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceRestartCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8977,13 +9131,20 @@ impl<'a, C, A> InstanceExportCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> InstanceExportCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceExportCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9256,13 +9417,20 @@ impl<'a, C, A> InstanceRestoreBackupCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> InstanceRestoreBackupCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> InstanceRestoreBackupCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9471,13 +9639,20 @@ impl<'a, C, A> FlagListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> FlagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FlagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9731,13 +9906,20 @@ impl<'a, C, A> DatabaseDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabaseDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabaseDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10022,13 +10204,20 @@ impl<'a, C, A> DatabasePatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabasePatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabasePatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10270,13 +10459,20 @@ impl<'a, C, A> DatabaseListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabaseListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabaseListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10549,13 +10745,20 @@ impl<'a, C, A> DatabaseInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabaseInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabaseInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10809,13 +11012,20 @@ impl<'a, C, A> DatabaseGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabaseGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabaseGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11100,13 +11310,20 @@ impl<'a, C, A> DatabaseUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DatabaseUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DatabaseUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11379,13 +11596,20 @@ impl<'a, C, A> SslCertInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SslCertInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SslCertInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11639,13 +11863,20 @@ impl<'a, C, A> SslCertDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SslCertDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SslCertDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11899,13 +12130,20 @@ impl<'a, C, A> SslCertGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SslCertGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SslCertGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12178,13 +12416,20 @@ impl<'a, C, A> SslCertCreateEphemeralCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SslCertCreateEphemeralCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SslCertCreateEphemeralCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12426,13 +12671,20 @@ impl<'a, C, A> SslCertListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SslCertListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SslCertListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12698,13 +12950,20 @@ impl<'a, C, A> BackupRunListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BackupRunListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BackupRunListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12958,13 +13217,20 @@ impl<'a, C, A> BackupRunGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BackupRunGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BackupRunGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13218,13 +13484,20 @@ impl<'a, C, A> BackupRunDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BackupRunDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BackupRunDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13497,13 +13770,20 @@ impl<'a, C, A> BackupRunInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BackupRunInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BackupRunInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/storage1/src/lib.rs b/gen/storage1/src/lib.rs index 1c1fbbb2ad..fb35cd9bcc 100644 --- a/gen/storage1/src/lib.rs +++ b/gen/storage1/src/lib.rs @@ -3071,13 +3071,20 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DefaultObjectAccessControlInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3343,13 +3350,20 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DefaultObjectAccessControlListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3634,13 +3648,20 @@ impl<'a, C, A> DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DefaultObjectAccessControlPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3883,13 +3904,20 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DefaultObjectAccessControlDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4174,13 +4202,20 @@ impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> DefaultObjectAccessControlUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4434,13 +4469,20 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> DefaultObjectAccessControlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> DefaultObjectAccessControlGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4725,13 +4767,20 @@ impl<'a, C, A> BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4974,13 +5023,20 @@ impl<'a, C, A> BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5253,13 +5309,20 @@ impl<'a, C, A> BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5513,13 +5576,20 @@ impl<'a, C, A> BucketAccessControlGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5804,13 +5874,20 @@ impl<'a, C, A> BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6052,13 +6129,20 @@ impl<'a, C, A> BucketAccessControlListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketAccessControlListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketAccessControlListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6275,13 +6359,20 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6554,13 +6645,20 @@ impl<'a, C, A> NotificationInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> NotificationInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6803,13 +6901,20 @@ impl<'a, C, A> NotificationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> NotificationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7063,13 +7168,20 @@ impl<'a, C, A> NotificationGetCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7311,13 +7423,20 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> NotificationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> NotificationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7782,13 +7901,20 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectRewriteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectRewriteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8135,13 +8261,20 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8486,13 +8619,20 @@ impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectWatchAllCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectWatchAllCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8789,13 +8929,20 @@ impl<'a, C, A> ObjectSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9061,13 +9208,20 @@ impl<'a, C, A> ObjectGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9457,13 +9611,20 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9617,9 +9778,9 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/storage/v1/b/{bucket}/o", "multipart") + (self.hub._root_url.clone() + "upload/storage/v1/b/{bucket}/o", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/storage/v1/b/{bucket}/o", "resumable") + (self.hub._root_url.clone() + "resumable/upload/storage/v1/b/{bucket}/o", "resumable") } else { unreachable!() }; @@ -9963,13 +10124,20 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10311,13 +10479,20 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectComposeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectComposeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10620,13 +10795,20 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10940,13 +11122,20 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11229,13 +11418,20 @@ impl<'a, C, A> ObjectTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11697,13 +11893,20 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectCopyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectCopyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12072,13 +12275,20 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ObjectPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12356,13 +12566,20 @@ impl<'a, C, A> ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12671,13 +12888,20 @@ impl<'a, C, A> ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12943,13 +13167,20 @@ impl<'a, C, A> ObjectAccessControlListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13216,13 +13447,20 @@ impl<'a, C, A> ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13531,13 +13769,20 @@ impl<'a, C, A> ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13834,13 +14079,20 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ObjectAccessControlInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ObjectAccessControlInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14173,13 +14425,20 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14512,13 +14771,20 @@ impl<'a, C, A> BucketUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14796,13 +15062,20 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15057,13 +15330,20 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15339,13 +15619,20 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15604,13 +15891,20 @@ impl<'a, C, A> BucketTestIamPermissionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketTestIamPermissionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketTestIamPermissionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15883,13 +16177,20 @@ impl<'a, C, A> BucketSetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketSetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketSetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16131,13 +16432,20 @@ impl<'a, C, A> BucketGetIamPolicyCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> BucketGetIamPolicyCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketGetIamPolicyCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16394,13 +16702,20 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> BucketListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> BucketListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16630,13 +16945,20 @@ impl<'a, C, A> ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ProjectServiceAccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ProjectServiceAccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/storagetransfer1/src/lib.rs b/gen/storagetransfer1/src/lib.rs index 1975e1e5ee..17bba8e450 100644 --- a/gen/storagetransfer1/src/lib.rs +++ b/gen/storagetransfer1/src/lib.rs @@ -1775,13 +1775,20 @@ impl<'a, C, A> TransferOperationPauseCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationPauseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationPauseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2053,13 +2060,20 @@ impl<'a, C, A> TransferOperationResumeCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationResumeCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationResumeCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2299,13 +2313,20 @@ impl<'a, C, A> TransferOperationDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2547,13 +2568,20 @@ impl<'a, C, A> TransferOperationGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2833,13 +2861,20 @@ impl<'a, C, A> TransferOperationListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3079,13 +3114,20 @@ impl<'a, C, A> TransferOperationCancelCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> TransferOperationCancelCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferOperationCancelCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3330,13 +3372,20 @@ impl<'a, C, A> GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> GoogleServiceAccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GoogleServiceAccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3582,13 +3631,20 @@ impl<'a, C, A> TransferJobListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TransferJobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferJobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3862,13 +3918,20 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TransferJobPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferJobPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4122,13 +4185,20 @@ impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TransferJobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferJobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4362,13 +4432,20 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TransferJobCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TransferJobCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/surveys2/src/lib.rs b/gen/surveys2/src/lib.rs index 578a0ac7ea..1bff1b8d5a 100644 --- a/gen/surveys2/src/lib.rs +++ b/gen/surveys2/src/lib.rs @@ -1398,13 +1398,20 @@ impl<'a, C, A> SurveyStopCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyStopCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyStopCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1632,13 +1639,20 @@ impl<'a, C, A> SurveyInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1868,13 +1882,20 @@ impl<'a, C, A> SurveyDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2104,13 +2125,20 @@ impl<'a, C, A> SurveyListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2371,13 +2399,20 @@ impl<'a, C, A> SurveyUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2637,13 +2672,20 @@ impl<'a, C, A> SurveyStartCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyStartCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyStartCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2873,13 +2915,20 @@ impl<'a, C, A> SurveyGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SurveyGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SurveyGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3161,13 +3210,20 @@ impl<'a, C, A> ResultGetCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ResultGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ResultGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3397,13 +3453,20 @@ impl<'a, C, A> MobileapppanelListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MobileapppanelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileapppanelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3633,13 +3696,20 @@ impl<'a, C, A> MobileapppanelGetCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MobileapppanelGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileapppanelGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3900,13 +3970,20 @@ impl<'a, C, A> MobileapppanelUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> MobileapppanelUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MobileapppanelUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/tagmanager1/src/lib.rs b/gen/tagmanager1/src/lib.rs index fe082f87a3..050f3ce8d8 100644 --- a/gen/tagmanager1/src/lib.rs +++ b/gen/tagmanager1/src/lib.rs @@ -2730,13 +2730,20 @@ impl<'a, C, A> AccountContainerListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2966,13 +2973,20 @@ impl<'a, C, A> AccountPermissionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3245,13 +3259,20 @@ impl<'a, C, A> AccountContainerEnvironmentCreateCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerEnvironmentCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3512,13 +3533,20 @@ impl<'a, C, A> AccountPermissionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3761,13 +3789,20 @@ impl<'a, C, A> AccountContainerEnvironmentDeleteCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerEnvironmentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3998,13 +4033,20 @@ impl<'a, C, A> AccountPermissionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4246,13 +4288,20 @@ impl<'a, C, A> AccountContainerGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4549,13 +4598,20 @@ impl<'a, C, A> AccountContainerEnvironmentPatchCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerEnvironmentPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4821,13 +4877,20 @@ impl<'a, C, A> AccountContainerVersionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5124,13 +5187,20 @@ impl<'a, C, A> AccountContainerTriggerUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTriggerUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTriggerUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5384,13 +5454,20 @@ impl<'a, C, A> AccountContainerTriggerGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTriggerGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTriggerGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5621,13 +5698,20 @@ impl<'a, C, A> AccountContainerDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -5870,13 +5954,20 @@ impl<'a, C, A> AccountContainerFolderDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerFolderDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6137,13 +6228,20 @@ impl<'a, C, A> AccountContainerCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6386,13 +6484,20 @@ impl<'a, C, A> AccountContainerTagDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTagDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTagDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6646,13 +6751,20 @@ impl<'a, C, A> AccountContainerFolderEntityListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerFolderEntityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderEntityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -6906,13 +7018,20 @@ impl<'a, C, A> AccountContainerVersionUndeleteCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerVersionUndeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionUndeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7154,13 +7273,20 @@ impl<'a, C, A> AccountContainerEnvironmentListCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerEnvironmentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7402,13 +7528,20 @@ impl<'a, C, A> AccountContainerTagListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTagListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTagListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7674,13 +7807,20 @@ impl<'a, C, A> AccountContainerVersionPublishCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionPublishCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionPublishCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -7934,13 +8074,20 @@ impl<'a, C, A> AccountContainerFolderGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerFolderGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8194,13 +8341,20 @@ impl<'a, C, A> AccountContainerEnvironmentGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerEnvironmentGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8473,13 +8627,20 @@ impl<'a, C, A> AccountContainerTagCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTagCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTagCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8721,13 +8882,20 @@ impl<'a, C, A> AccountContainerTriggerListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTriggerListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTriggerListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -8970,13 +9138,20 @@ impl<'a, C, A> AccountContainerVersionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9249,13 +9424,20 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9528,13 +9710,20 @@ impl<'a, C, A> AccountContainerVersionCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9776,13 +9965,20 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10101,13 +10297,20 @@ impl<'a, C, A> AccountContainerMoveFolderUpdateCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerMoveFolderUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerMoveFolderUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10361,13 +10564,20 @@ impl<'a, C, A> AccountContainerVersionRestoreCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionRestoreCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionRestoreCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10640,13 +10850,20 @@ impl<'a, C, A> AccountContainerVariableCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVariableCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVariableCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10888,13 +11105,20 @@ impl<'a, C, A> AccountContainerVariableListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVariableListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVariableListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11148,13 +11372,20 @@ impl<'a, C, A> AccountContainerTagGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTagGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTagGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11408,13 +11639,20 @@ impl<'a, C, A> AccountContainerVariableGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVariableGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVariableGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11657,13 +11895,20 @@ impl<'a, C, A> AccountContainerTriggerDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTriggerDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTriggerDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11936,13 +12181,20 @@ impl<'a, C, A> AccountContainerTriggerCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTriggerCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTriggerCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12239,13 +12491,20 @@ impl<'a, C, A> AccountContainerFolderUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerFolderUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12442,13 +12701,20 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12721,13 +12987,20 @@ impl<'a, C, A> AccountPermissionUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountPermissionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountPermissionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12970,13 +13243,20 @@ impl<'a, C, A> AccountContainerVariableDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVariableDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVariableDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13261,13 +13541,20 @@ impl<'a, C, A> AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> where /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13497,13 +13784,20 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13788,13 +14082,20 @@ impl<'a, C, A> AccountContainerUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14091,13 +14392,20 @@ impl<'a, C, A> AccountContainerTagUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerTagUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerTagUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14394,13 +14702,20 @@ impl<'a, C, A> AccountContainerEnvironmentUpdateCall<'a, C, A> where C: BorrowMu /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> AccountContainerEnvironmentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerEnvironmentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14673,13 +14988,20 @@ impl<'a, C, A> AccountContainerFolderCreateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerFolderCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14921,13 +15243,20 @@ impl<'a, C, A> AccountContainerFolderListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerFolderListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerFolderListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15224,13 +15553,20 @@ impl<'a, C, A> AccountContainerVersionUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15527,13 +15863,20 @@ impl<'a, C, A> AccountContainerVariableUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVariableUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVariableUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15787,13 +16130,20 @@ impl<'a, C, A> AccountContainerVersionGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> AccountContainerVersionGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> AccountContainerVersionGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/taskqueue1_beta2/src/lib.rs b/gen/taskqueue1_beta2/src/lib.rs index e96f0ad703..1f88ea13e4 100644 --- a/gen/taskqueue1_beta2/src/lib.rs +++ b/gen/taskqueue1_beta2/src/lib.rs @@ -1046,13 +1046,20 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskqueueGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskqueueGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1342,13 +1349,20 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskLeaseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskLeaseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1621,13 +1635,20 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1870,13 +1891,20 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2171,13 +2199,20 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2419,13 +2454,20 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2679,13 +2721,20 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2980,13 +3029,20 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/tasks1/src/lib.rs b/gen/tasks1/src/lib.rs index a65349bff2..1978e0d8f1 100644 --- a/gen/tasks1/src/lib.rs +++ b/gen/tasks1/src/lib.rs @@ -1253,13 +1253,20 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1532,13 +1539,20 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1811,13 +1825,20 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2036,13 +2057,20 @@ impl<'a, C, A> TaskClearCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskClearCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskClearCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2308,13 +2336,20 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskMoveCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskMoveCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2545,13 +2580,20 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2793,13 +2835,20 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3084,13 +3133,20 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TaskInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TaskInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3311,13 +3367,20 @@ impl<'a, C, A> TasklistListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3578,13 +3641,20 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3803,13 +3873,20 @@ impl<'a, C, A> TasklistDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4070,13 +4147,20 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistPatchCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistPatchCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4304,13 +4388,20 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4540,13 +4631,20 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> TasklistGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> TasklistGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/urlshortener1/src/lib.rs b/gen/urlshortener1/src/lib.rs index cd8fafad71..c5c51d0995 100644 --- a/gen/urlshortener1/src/lib.rs +++ b/gen/urlshortener1/src/lib.rs @@ -800,13 +800,20 @@ impl<'a, C, A> UrlInsertCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1027,13 +1034,20 @@ impl<'a, C, A> UrlGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1254,13 +1268,20 @@ impl<'a, C, A> UrlListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/webmasters3/src/lib.rs b/gen/webmasters3/src/lib.rs index 1d25d59e6a..9ba6139e6d 100644 --- a/gen/webmasters3/src/lib.rs +++ b/gen/webmasters3/src/lib.rs @@ -1417,13 +1417,20 @@ impl<'a, C, A> SitemapDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitemapDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitemapDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1654,13 +1661,20 @@ impl<'a, C, A> SitemapSubmitCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitemapSubmitCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitemapSubmitCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1902,13 +1916,20 @@ impl<'a, C, A> SitemapGetCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitemapGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitemapGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2150,13 +2171,20 @@ impl<'a, C, A> SitemapListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SitemapListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SitemapListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2386,13 +2414,20 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2611,13 +2646,20 @@ impl<'a, C, A> SiteAddCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteAddCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteAddCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2814,13 +2856,20 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3039,13 +3088,20 @@ impl<'a, C, A> SiteDeleteCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SiteDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SiteDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3308,13 +3364,20 @@ impl<'a, C, A> SearchanalyticQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SearchanalyticQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SearchanalyticQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3580,13 +3643,20 @@ impl<'a, C, A> UrlcrawlerrorscountQueryCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UrlcrawlerrorscountQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlcrawlerrorscountQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3852,13 +3922,20 @@ impl<'a, C, A> UrlcrawlerrorssampleGetCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UrlcrawlerrorssampleGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlcrawlerrorssampleGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4112,13 +4189,20 @@ impl<'a, C, A> UrlcrawlerrorssampleListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> UrlcrawlerrorssampleListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlcrawlerrorssampleListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -4373,13 +4457,20 @@ impl<'a, C, A> UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> where C: BorrowMut< /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs index 4b765dee20..fa79bb3637 100644 --- a/gen/youtube3/src/lib.rs +++ b/gen/youtube3/src/lib.rs @@ -9026,13 +9026,20 @@ impl<'a, C, A> ChannelSectionListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChannelSectionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelSectionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9337,13 +9344,20 @@ impl<'a, C, A> ChannelSectionInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChannelSectionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelSectionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9555,13 +9569,20 @@ impl<'a, C, A> ChannelSectionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChannelSectionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelSectionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -9850,13 +9871,20 @@ impl<'a, C, A> ChannelSectionUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChannelSectionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelSectionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10132,13 +10160,20 @@ impl<'a, C, A> PlaylistInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlaylistInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10451,13 +10486,20 @@ impl<'a, C, A> PlaylistListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlaylistListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10669,13 +10711,20 @@ impl<'a, C, A> PlaylistDeleteCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlaylistDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -10937,13 +10986,20 @@ impl<'a, C, A> PlaylistUpdateCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlaylistUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11174,13 +11230,20 @@ impl<'a, C, A> VideoReportAbuseCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoReportAbuseCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoReportAbuseCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11543,13 +11606,20 @@ impl<'a, C, A> VideoListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11759,13 +11829,20 @@ impl<'a, C, A> VideoRateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoRateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoRateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -11988,13 +12065,20 @@ impl<'a, C, A> VideoGetRatingCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoGetRatingCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoGetRatingCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12206,13 +12290,20 @@ impl<'a, C, A> VideoDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12476,13 +12567,20 @@ impl<'a, C, A> VideoUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -12598,9 +12696,9 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/youtube/v3/videos", "multipart") + (self.hub._root_url.clone() + "upload/youtube/v3/videos", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/videos", "resumable") + (self.hub._root_url.clone() + "resumable/upload/youtube/v3/videos", "resumable") } else { unreachable!() }; @@ -12910,13 +13008,20 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13223,13 +13328,20 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13477,13 +13589,20 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ActivityInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ActivityInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -13797,13 +13916,20 @@ impl<'a, C, A> LiveStreamUpdateCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveStreamUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveStreamUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14031,13 +14157,20 @@ impl<'a, C, A> LiveStreamDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveStreamDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveStreamDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14348,13 +14481,20 @@ impl<'a, C, A> LiveStreamListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveStreamListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveStreamListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14666,13 +14806,20 @@ impl<'a, C, A> LiveStreamInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveStreamInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveStreamInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -14934,13 +15081,20 @@ impl<'a, C, A> ChannelUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15275,13 +15429,20 @@ impl<'a, C, A> ChannelListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ChannelListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15373,9 +15534,9 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/youtube/v3/watermarks/set", "multipart") + (self.hub._root_url.clone() + "upload/youtube/v3/watermarks/set", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/watermarks/set", "resumable") + (self.hub._root_url.clone() + "resumable/upload/youtube/v3/watermarks/set", "resumable") } else { unreachable!() }; @@ -15638,13 +15799,20 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WatermarkSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WatermarkSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -15856,13 +16024,20 @@ impl<'a, C, A> WatermarkUnsetCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> WatermarkUnsetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> WatermarkUnsetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16108,13 +16283,20 @@ impl<'a, C, A> LiveChatModeratorInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatModeratorInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatModeratorInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16379,13 +16561,20 @@ impl<'a, C, A> LiveChatModeratorListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatModeratorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatModeratorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16583,13 +16772,20 @@ impl<'a, C, A> LiveChatModeratorDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatModeratorDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatModeratorDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16813,13 +17009,20 @@ impl<'a, C, A> CaptionDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CaptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CaptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -16925,9 +17128,9 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/youtube/v3/captions", "multipart") + (self.hub._root_url.clone() + "upload/youtube/v3/captions", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/captions", "resumable") + (self.hub._root_url.clone() + "resumable/upload/youtube/v3/captions", "resumable") } else { unreachable!() }; @@ -17219,13 +17422,20 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CaptionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CaptionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17503,13 +17713,20 @@ impl<'a, C, A> CaptionListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CaptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CaptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17781,13 +17998,20 @@ impl<'a, C, A> CaptionDownloadCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CaptionDownloadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CaptionDownloadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -17893,9 +18117,9 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/youtube/v3/captions", "multipart") + (self.hub._root_url.clone() + "upload/youtube/v3/captions", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/captions", "resumable") + (self.hub._root_url.clone() + "resumable/upload/youtube/v3/captions", "resumable") } else { unreachable!() }; @@ -18187,13 +18411,20 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CaptionUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CaptionUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18414,13 +18645,20 @@ impl<'a, C, A> I18nLanguageListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> I18nLanguageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> I18nLanguageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -18665,13 +18903,20 @@ impl<'a, C, A> GuideCategoryListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GuideCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GuideCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19010,13 +19255,20 @@ impl<'a, C, A> CommentThreadListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentThreadListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentThreadListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19262,13 +19514,20 @@ impl<'a, C, A> CommentThreadUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CommentThreadUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentThreadUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19514,13 +19773,20 @@ impl<'a, C, A> CommentThreadInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CommentThreadInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentThreadInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19766,13 +20032,20 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -19996,13 +20269,20 @@ impl<'a, C, A> CommentSetModerationStatuCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> CommentSetModerationStatuCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentSetModerationStatuCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20200,13 +20480,20 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20481,13 +20768,20 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20733,13 +21027,20 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -20937,13 +21238,20 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> CommentMarkAsSpamCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> CommentMarkAsSpamCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21203,13 +21511,20 @@ impl<'a, C, A> PlaylistItemInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlaylistItemInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistItemInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21421,13 +21736,20 @@ impl<'a, C, A> PlaylistItemDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlaylistItemDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistItemDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21712,13 +22034,20 @@ impl<'a, C, A> PlaylistItemListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> PlaylistItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -21980,13 +22309,20 @@ impl<'a, C, A> PlaylistItemUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> PlaylistItemUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> PlaylistItemUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22277,13 +22613,20 @@ impl<'a, C, A> LiveChatMessageListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatMessageListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatMessageListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22481,13 +22824,20 @@ impl<'a, C, A> LiveChatMessageDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatMessageDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatMessageDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22733,13 +23083,20 @@ impl<'a, C, A> LiveChatMessageInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveChatMessageInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatMessageInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -22984,13 +23341,20 @@ impl<'a, C, A> VideoCategoryListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> VideoCategoryListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoCategoryListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23211,13 +23575,20 @@ impl<'a, C, A> I18nRegionListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> I18nRegionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> I18nRegionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23463,13 +23834,20 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -23667,13 +24045,20 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24022,13 +24407,20 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SubscriptionListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SubscriptionListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24274,13 +24666,20 @@ impl<'a, C, A> LiveChatBanInsertCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveChatBanInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatBanInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24478,13 +24877,20 @@ impl<'a, C, A> LiveChatBanDeleteCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveChatBanDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveChatBanDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24749,13 +25155,20 @@ impl<'a, C, A> SponsorListCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SponsorListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SponsorListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -24996,13 +25409,20 @@ impl<'a, C, A> VideoAbuseReportReasonListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> VideoAbuseReportReasonListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> VideoAbuseReportReasonListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25316,13 +25736,20 @@ impl<'a, C, A> LiveBroadcastControlCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveBroadcastControlCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastControlCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25636,13 +26063,20 @@ impl<'a, C, A> LiveBroadcastUpdateCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveBroadcastUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -25928,13 +26362,20 @@ impl<'a, C, A> LiveBroadcastBindCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveBroadcastBindCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastBindCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26220,13 +26661,20 @@ impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveBroadcastTransitionCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastTransitionCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26538,13 +26986,20 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveBroadcastInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -26772,13 +27227,20 @@ impl<'a, C, A> LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> LiveBroadcastDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27113,13 +27575,20 @@ impl<'a, C, A> LiveBroadcastListCall<'a, C, A> where C: BorrowMut /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> LiveBroadcastListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> LiveBroadcastListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -27214,9 +27683,9 @@ impl<'a, C, A> ChannelBannerInsertCall<'a, C, A> where C: BorrowMut ChannelBannerInsertCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> ChannelBannerInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ChannelBannerInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28068,13 +28544,20 @@ impl<'a, C, A> SearchListCall<'a, C, A> where C: BorrowMut, A: oa /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> SearchListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SearchListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28341,13 +28824,20 @@ impl<'a, C, A> SuperChatEventListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> SuperChatEventListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> SuperChatEventListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28433,9 +28923,9 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - (self.hub._root_url.clone() + "/upload/youtube/v3/thumbnails/set", "multipart") + (self.hub._root_url.clone() + "upload/youtube/v3/thumbnails/set", "multipart") } else if protocol == "resumable" { - (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/thumbnails/set", "resumable") + (self.hub._root_url.clone() + "resumable/upload/youtube/v3/thumbnails/set", "resumable") } else { unreachable!() }; @@ -28679,13 +29169,20 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ThumbnailSetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ThumbnailSetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -28952,13 +29449,20 @@ impl<'a, C, A> FanFundingEventListCall<'a, C, A> where C: BorrowMut(mut self, scope: T) -> FanFundingEventListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> FanFundingEventListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/youtubeanalytics1/src/lib.rs b/gen/youtubeanalytics1/src/lib.rs index beea502def..28f2c00054 100644 --- a/gen/youtubeanalytics1/src/lib.rs +++ b/gen/youtubeanalytics1/src/lib.rs @@ -1209,13 +1209,20 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportQueryCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportQueryCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1457,13 +1464,20 @@ impl<'a, C, A> GroupItemInsertCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupItemInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupItemInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1686,13 +1700,20 @@ impl<'a, C, A> GroupItemListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupItemListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupItemListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1904,13 +1925,20 @@ impl<'a, C, A> GroupItemDeleteCall<'a, C, A> where C: BorrowMut, /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupItemDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupItemDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2122,13 +2150,20 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2370,13 +2405,20 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupInsertCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupInsertCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2623,13 +2665,20 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2871,13 +2920,20 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> GroupUpdateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> GroupUpdateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } diff --git a/gen/youtubereporting1/src/lib.rs b/gen/youtubereporting1/src/lib.rs index 05d5631769..73189b6fd7 100644 --- a/gen/youtubereporting1/src/lib.rs +++ b/gen/youtubereporting1/src/lib.rs @@ -1155,13 +1155,20 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> MediaDownloadCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> MediaDownloadCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1419,13 +1426,20 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> ReportTypeListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> ReportTypeListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1674,13 +1688,20 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobDeleteCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobDeleteCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -1941,13 +1962,20 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobReportGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobReportGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2196,13 +2224,20 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobGetCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobGetCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2518,13 +2553,20 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobReportListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobReportListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -2782,13 +2824,20 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobListCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobListCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } } @@ -3035,13 +3084,20 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau /// /// The `scope` will be added to a set of scopes. This is important as one can maintain access /// tokens for more than one scope. + /// If `None` is specified, then all scopes will be removed and no default scope will be used either. + /// In that case, you have to specify your API-key using the `key` parameter (see the `param()` + /// function for details). /// /// 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) -> JobCreateCall<'a, C, A> - where T: AsRef { - self._scopes.insert(scope.as_ref().to_string(), ()); + pub fn add_scope(mut self, scope: T) -> JobCreateCall<'a, C, A> + where T: Into>, + S: AsRef { + match scope.into() { + Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()), + None => None, + }; self } }