From 9ffa241f37fb1a8524cd15525944e253ad07db1f Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Sat, 6 May 2017 17:59:05 -0700 Subject: [PATCH] feat(hub): Allow overriding rootUrl and baseUrl Allow the hub to override `rootUrl` and `baseUrl` for the service. This is useful for pointing at localhost for testing or a proxy. --- gen/adexchangebuyer1d3/src/lib.rs | 69 ++- gen/adexchangebuyer1d4/src/lib.rs | 103 +++-- gen/adexchangeseller2/src/lib.rs | 55 ++- gen/admin1_directory/src/lib.rs | 219 +++++---- gen/admin1_reports/src/lib.rs | 37 +- gen/adsense1d4/src/lib.rs | 103 +++-- gen/adsensehost4d1/src/lib.rs | 79 ++-- gen/analytics3/src/lib.rs | 197 ++++---- gen/androidenterprise1/src/lib.rs | 205 ++++---- gen/androidpublisher2/src/lib.rs | 149 +++--- gen/appengine1/src/lib.rs | 69 ++- gen/appengine1_beta4/src/lib.rs | 67 ++- gen/appengine1_beta5/src/lib.rs | 67 ++- gen/appsactivity1/src/lib.rs | 29 +- gen/appstate1/src/lib.rs | 37 +- gen/autoscaler1_beta2/src/lib.rs | 47 +- gen/bigquery2/src/lib.rs | 71 ++- gen/blogger3/src/lib.rs | 93 ++-- gen/books1/src/lib.rs | 123 +++-- gen/calendar3/src/lib.rs | 101 ++-- gen/classroom1/src/lib.rs | 107 +++-- gen/cloudbilling1/src/lib.rs | 37 +- gen/clouddebugger2/src/lib.rs | 43 +- gen/cloudlatencytest2/src/lib.rs | 31 +- gen/cloudmonitoring2_beta2/src/lib.rs | 39 +- gen/cloudresourcemanager1/src/lib.rs | 59 ++- gen/cloudresourcemanager1_beta1/src/lib.rs | 59 ++- gen/clouduseraccountsvm_beta/src/lib.rs | 61 ++- gen/container1/src/lib.rs | 51 +- gen/content2/src/lib.rs | 151 +++--- gen/content2_sandbox/src/lib.rs | 57 ++- gen/coordinate1/src/lib.rs | 51 +- gen/customsearch1/src/lib.rs | 29 +- gen/dataproc1/src/lib.rs | 57 ++- gen/deploymentmanager2/src/lib.rs | 63 ++- gen/deploymentmanager2_beta2/src/lib.rs | 53 ++- gen/dfareporting2d1/src/lib.rs | 415 +++++++++-------- gen/dfareporting2d2/src/lib.rs | 415 +++++++++-------- gen/dfareporting2d3/src/lib.rs | 413 +++++++++-------- gen/dfareporting2d4/src/lib.rs | 413 +++++++++-------- gen/dfareporting2d5/src/lib.rs | 421 +++++++++-------- gen/dfareporting2d6/src/lib.rs | 433 +++++++++-------- gen/dfareporting2d7/src/lib.rs | 437 +++++++++--------- gen/discovery1/src/lib.rs | 31 +- gen/dns1/src/lib.rs | 45 +- gen/doubleclickbidmanager1/src/lib.rs | 45 +- gen/doubleclicksearch2/src/lib.rs | 47 +- gen/drive2/src/lib.rs | 155 ++++--- gen/drive3/src/lib.rs | 99 ++-- gen/firebasedynamiclinks1/src/lib.rs | 29 +- gen/fitness1/src/lib.rs | 53 ++- gen/fusiontables2/src/lib.rs | 99 ++-- gen/games1/src/lib.rs | 133 +++--- .../src/lib.rs | 55 ++- gen/gamesmanagement1_management/src/lib.rs | 81 ++-- gen/gan1_beta1/src/lib.rs | 47 +- gen/genomics1/src/lib.rs | 139 +++--- gen/gmail1/src/lib.rs | 153 +++--- gen/groupsmigration1/src/lib.rs | 31 +- gen/groupssettings1/src/lib.rs | 33 +- gen/iam1/src/lib.rs | 55 ++- gen/identitytoolkit3/src/lib.rs | 61 ++- gen/kgsearch1/src/lib.rs | 29 +- gen/licensing1/src/lib.rs | 41 +- gen/logging2/src/lib.rs | 99 ++-- gen/logging2_beta1/src/lib.rs | 65 ++- gen/manager1_beta2/src/lib.rs | 43 +- gen/manufacturers1/src/lib.rs | 31 +- gen/mirror1/src/lib.rs | 81 ++-- gen/ml1_beta1/src/lib.rs | 65 ++- gen/monitoring3/src/lib.rs | 57 ++- gen/pagespeedonline2/src/lib.rs | 29 +- gen/partners2/src/lib.rs | 39 +- gen/people1/src/lib.rs | 33 +- gen/playmoviespartner1/src/lib.rs | 47 +- gen/plus1/src/lib.rs | 45 +- gen/plusdomains1/src/lib.rs | 69 ++- gen/prediction1d6/src/lib.rs | 43 +- gen/proximitybeacon1_beta1/src/lib.rs | 59 ++- gen/pubsub1/src/lib.rs | 73 ++- gen/pubsub1_beta2/src/lib.rs | 67 ++- gen/qpxexpress1/src/lib.rs | 29 +- gen/replicapool1_beta2/src/lib.rs | 51 +- gen/replicapoolupdater1_beta1/src/lib.rs | 47 +- gen/reseller1_sandbox/src/lib.rs | 55 ++- gen/resourceviews1_beta2/src/lib.rs | 49 +- gen/safebrowsing4/src/lib.rs | 35 +- gen/serviceregistryalpha/src/lib.rs | 43 +- gen/siteverification1/src/lib.rs | 41 +- gen/slides1/src/lib.rs | 35 +- gen/spectrum1_explorer/src/lib.rs | 39 +- gen/sqladmin1_beta4/src/lib.rs | 107 +++-- gen/storage1/src/lib.rs | 99 ++-- gen/storagetransfer1/src/lib.rs | 51 +- gen/surveys2/src/lib.rs | 49 +- gen/tagmanager1/src/lib.rs | 127 ++--- gen/taskqueue1_beta2/src/lib.rs | 43 +- gen/tasks1/src/lib.rs | 55 ++- gen/translate2/src/lib.rs | 33 +- gen/urlshortener1/src/lib.rs | 33 +- gen/webfonts1/src/lib.rs | 29 +- gen/webmasters3/src/lib.rs | 53 ++- gen/youtube3/src/lib.rs | 181 ++++---- gen/youtubeanalytics1/src/lib.rs | 43 +- gen/youtubereporting1/src/lib.rs | 43 +- src/mako/api/lib.rs.mako | 29 +- src/mako/api/lib/mbuild.mako | 4 +- 107 files changed, 6031 insertions(+), 3593 deletions(-) diff --git a/gen/adexchangebuyer1d3/src/lib.rs b/gen/adexchangebuyer1d3/src/lib.rs index 445981663d..ccbfcb2a82 100644 --- a/gen/adexchangebuyer1d3/src/lib.rs +++ b/gen/adexchangebuyer1d3/src/lib.rs @@ -191,7 +191,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -322,6 +322,8 @@ pub struct AdExchangeBuyer { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AdExchangeBuyer {} @@ -334,6 +336,8 @@ impl<'a, C, A> AdExchangeBuyer client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/adexchangebuyer/v1.3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -368,6 +372,26 @@ impl<'a, C, A> AdExchangeBuyer self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/adexchangebuyer/v1.3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1885,7 +1909,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -2118,7 +2142,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -2320,7 +2344,7 @@ impl<'a, C, A> DirectDealListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/directdeals".to_string(); + let mut url = self.hub._base_url.clone() + "directdeals"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -2524,7 +2548,7 @@ impl<'a, C, A> DirectDealGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/directdeals/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "directdeals/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -2768,7 +2792,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -3046,7 +3070,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -3317,7 +3341,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -3567,7 +3591,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -3822,7 +3846,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4065,7 +4089,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/creatives/{accountId}/{buyerCreativeId}".to_string(); + let mut url = self.hub._base_url.clone() + "creatives/{accountId}/{buyerCreativeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4317,7 +4341,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4583,7 +4607,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4840,7 +4864,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -5044,7 +5068,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -5293,7 +5317,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AdExchangeBuyer {} @@ -346,6 +348,8 @@ impl<'a, C, A> AdExchangeBuyer client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/adexchangebuyer/v1.4/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -395,6 +399,26 @@ impl<'a, C, A> AdExchangeBuyer self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/adexchangebuyer/v1.4/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -3743,7 +3767,7 @@ impl<'a, C, A> PubprofileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/publisher/{accountId}/profiles".to_string(); + let mut url = self.hub._base_url.clone() + "publisher/{accountId}/profiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -3978,7 +4002,7 @@ impl<'a, C, A> BillingInfoGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/billinginfo/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4211,7 +4235,7 @@ impl<'a, C, A> BillingInfoListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/billinginfo".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -4422,7 +4446,7 @@ impl<'a, C, A> MarketplacedealDeleteCall<'a, C, A> where C: BorrowMut MarketplacedealInsertCall<'a, C, A> where C: BorrowMut MarketplacedealUpdateCall<'a, C, A> where C: BorrowMut MarketplacedealListCall<'a, C, A> where C: BorrowMut MarketplaceprivateauctionUpdateproposalCall<'a, C, A> where C: Bo } - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/privateauction/{privateAuctionId}/updateproposal".to_string(); + let mut url = self.hub._base_url.clone() + "privateauction/{privateAuctionId}/updateproposal"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -5718,7 +5742,7 @@ impl<'a, C, A> ProposalSearchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/proposals/search".to_string(); + let mut url = self.hub._base_url.clone() + "proposals/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -5934,7 +5958,7 @@ impl<'a, C, A> ProposalInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/proposals/insert".to_string(); + let mut url = self.hub._base_url.clone() + "proposals/insert"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -6173,7 +6197,7 @@ impl<'a, C, A> ProposalUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/proposals/{proposalId}/{revisionNumber}/{updateAction}".to_string(); + let mut url = self.hub._base_url.clone() + "proposals/{proposalId}/{revisionNumber}/{updateAction}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -6451,7 +6475,7 @@ impl<'a, C, A> ProposalSetupcompleteCall<'a, C, A> where C: BorrowMut ProposalPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/proposals/{proposalId}/{revisionNumber}/{updateAction}".to_string(); + let mut url = self.hub._base_url.clone() + "proposals/{proposalId}/{revisionNumber}/{updateAction}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -6966,7 +6990,7 @@ impl<'a, C, A> ProposalGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/proposals/{proposalId}".to_string(); + let mut url = self.hub._base_url.clone() + "proposals/{proposalId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -7210,7 +7234,7 @@ impl<'a, C, A> BudgetUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -7481,7 +7505,7 @@ impl<'a, C, A> BudgetGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -7735,7 +7759,7 @@ impl<'a, C, A> BudgetPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/billinginfo/{accountId}/{billingId}".to_string(); + let mut url = self.hub._base_url.clone() + "billinginfo/{accountId}/{billingId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -8018,7 +8042,7 @@ impl<'a, C, A> PerformanceReportListCall<'a, C, A> where C: BorrowMut ProductSearchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/products/search".to_string(); + let mut url = self.hub._base_url.clone() + "products/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -8480,7 +8504,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/products/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "products/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -8720,7 +8744,7 @@ impl<'a, C, A> MarketplacenoteListCall<'a, C, A> where C: BorrowMut MarketplacenoteInsertCall<'a, C, A> where C: BorrowMut AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -9504,7 +9528,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -9708,7 +9732,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -9955,7 +9979,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -10253,7 +10277,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -10504,7 +10528,7 @@ impl<'a, C, A> CreativeRemoveDealCall<'a, C, A> where C: BorrowMut CreativeAddDealCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/creatives/{accountId}/{buyerCreativeId}/addDeal/{dealId}".to_string(); + let mut url = self.hub._base_url.clone() + "creatives/{accountId}/{buyerCreativeId}/addDeal/{dealId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -10999,7 +11023,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/creatives/{accountId}/{buyerCreativeId}".to_string(); + let mut url = self.hub._base_url.clone() + "creatives/{accountId}/{buyerCreativeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -11249,7 +11273,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -11479,7 +11503,7 @@ impl<'a, C, A> CreativeListDealCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangebuyer/v1.4/creatives/{accountId}/{buyerCreativeId}/listDeals".to_string(); + let mut url = self.hub._base_url.clone() + "creatives/{accountId}/{buyerCreativeId}/listDeals"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeBuyer.as_ref().to_string(), ()); } @@ -11731,7 +11755,7 @@ impl<'a, C, A> PretargetingConfigInsertCall<'a, C, A> where C: BorrowMut PretargetingConfigListCall<'a, C, A> where C: BorrowMut PretargetingConfigUpdateCall<'a, C, A> where C: BorrowMut PretargetingConfigPatchCall<'a, C, A> where C: BorrowMut PretargetingConfigDeleteCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut PretargetingConfigGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AdExchangeSeller {} @@ -342,6 +344,8 @@ impl<'a, C, A> AdExchangeSeller client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/adexchangeseller/v2.0/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -358,6 +362,26 @@ impl<'a, C, A> AdExchangeSeller self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/adexchangeseller/v2.0/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1244,7 +1268,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountMetadataMetricListCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountPreferreddealGetCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountMetadataDimensionListCall<'a, C, A> where C: BorrowMut AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangeseller/v2.0/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeSellerReadonly.as_ref().to_string(), ()); } @@ -4153,7 +4177,7 @@ impl<'a, C, A> AccountAlertListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangeseller/v2.0/accounts/{accountId}/alerts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/alerts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeSellerReadonly.as_ref().to_string(), ()); } @@ -4395,7 +4419,7 @@ impl<'a, C, A> AccountPreferreddealListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adexchangeseller/v2.0/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AdexchangeSellerReadonly.as_ref().to_string(), ()); } @@ -4795,4 +4819,3 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/admin1_directory/src/lib.rs b/gen/admin1_directory/src/lib.rs index 9f36405a96..bc207b77cf 100644 --- a/gen/admin1_directory/src/lib.rs +++ b/gen/admin1_directory/src/lib.rs @@ -248,7 +248,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -495,6 +495,8 @@ pub struct Directory { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Directory {} @@ -507,6 +509,8 @@ impl<'a, C, A> Directory client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/admin/directory/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -577,6 +581,26 @@ impl<'a, C, A> Directory self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/admin/directory/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -5026,7 +5050,7 @@ impl<'a, C, A> VerificationCodeGenerateCall<'a, C, A> where C: BorrowMut VerificationCodeInvalidateCall<'a, C, A> where C: BorrowMut VerificationCodeListCall<'a, C, A> where C: BorrowMut CustomerPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customers/{customerKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryCustomer.as_ref().to_string(), ()); } @@ -5976,7 +6000,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customers/{customerKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryCustomerReadonly.as_ref().to_string(), ()); } @@ -6218,7 +6242,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customers/{customerKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryCustomer.as_ref().to_string(), ()); } @@ -6487,7 +6511,7 @@ impl<'a, C, A> OrgunitListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunitReadonly.as_ref().to_string(), ()); } @@ -6743,7 +6767,7 @@ impl<'a, C, A> OrgunitInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } @@ -7015,7 +7039,7 @@ impl<'a, C, A> OrgunitUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits{/orgUnitPath*}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } @@ -7290,7 +7314,7 @@ impl<'a, C, A> OrgunitDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits{/orgUnitPath*}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } @@ -7532,7 +7556,7 @@ impl<'a, C, A> OrgunitGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits{/orgUnitPath*}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunitReadonly.as_ref().to_string(), ()); } @@ -7791,7 +7815,7 @@ impl<'a, C, A> OrgunitPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/orgunits{/orgUnitPath*}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/orgunits{/orgUnitPath*}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryOrgunit.as_ref().to_string(), ()); } @@ -8068,7 +8092,7 @@ impl<'a, C, A> MemberInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -8336,7 +8360,7 @@ impl<'a, C, A> MemberPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members/{memberKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -8614,7 +8638,7 @@ impl<'a, C, A> MemberUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members/{memberKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -8898,7 +8922,7 @@ impl<'a, C, A> MemberListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroupMemberReadonly.as_ref().to_string(), ()); } @@ -9156,7 +9180,7 @@ impl<'a, C, A> MemberGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members/{memberKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroupMemberReadonly.as_ref().to_string(), ()); } @@ -9402,7 +9426,7 @@ impl<'a, C, A> MemberDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/members/{memberKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/members/{memberKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -9646,7 +9670,7 @@ impl<'a, C, A> RoleUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles/{roleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagement.as_ref().to_string(), ()); } @@ -9917,7 +9941,7 @@ impl<'a, C, A> RoleGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles/{roleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagementReadonly.as_ref().to_string(), ()); } @@ -10163,7 +10187,7 @@ impl<'a, C, A> RoleDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles/{roleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagement.as_ref().to_string(), ()); } @@ -10407,7 +10431,7 @@ impl<'a, C, A> RolePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles/{roleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagement.as_ref().to_string(), ()); } @@ -10683,7 +10707,7 @@ impl<'a, C, A> RoleInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagement.as_ref().to_string(), ()); } @@ -10952,7 +10976,7 @@ impl<'a, C, A> RoleListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagementReadonly.as_ref().to_string(), ()); } @@ -11216,7 +11240,7 @@ impl<'a, C, A> NotificationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/notifications"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } @@ -11481,7 +11505,7 @@ impl<'a, C, A> NotificationUpdateCall<'a, C, A> where C: BorrowMut NotificationDeleteCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/notifications/{notificationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } @@ -12242,7 +12266,7 @@ impl<'a, C, A> NotificationPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/notifications/{notificationId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/notifications/{notificationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryNotification.as_ref().to_string(), ()); } @@ -12511,7 +12535,7 @@ impl<'a, C, A> PrivilegeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roles/ALL/privileges".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roles/ALL/privileges"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagementReadonly.as_ref().to_string(), ()); } @@ -12750,7 +12774,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/admin/directory/v1//admin/directory_v1/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "/admin/directory_v1/channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -12975,7 +12999,7 @@ impl<'a, C, A> MobiledeviceGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/devices/mobile/{resourceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDeviceMobileReadonly.as_ref().to_string(), ()); } @@ -13257,7 +13281,7 @@ impl<'a, C, A> MobiledeviceListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/mobile".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/devices/mobile"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDeviceMobileReadonly.as_ref().to_string(), ()); } @@ -13535,7 +13559,7 @@ impl<'a, C, A> MobiledeviceDeleteCall<'a, C, A> where C: BorrowMut MobiledeviceActionCall<'a, C, A> where C: BorrowMut TokenGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/tokens/{clientId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -14284,7 +14308,7 @@ impl<'a, C, A> TokenListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/tokens"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -14520,7 +14544,7 @@ impl<'a, C, A> TokenDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/tokens/{clientId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/tokens/{clientId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -14762,7 +14786,7 @@ impl<'a, C, A> RoleAssignmentInsertCall<'a, C, A> where C: BorrowMut RoleAssignmentGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/roleassignments/{roleAssignmentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryRolemanagementReadonly.as_ref().to_string(), ()); } @@ -15269,7 +15293,7 @@ impl<'a, C, A> RoleAssignmentDeleteCall<'a, C, A> where C: BorrowMut RoleAssignmentListCall<'a, C, A> where C: BorrowMut ChromeosdeviceListCall<'a, C, A> where C: BorrowMut ChromeosdevicePatchCall<'a, C, A> where C: BorrowMut ChromeosdeviceUpdateCall<'a, C, A> where C: BorrowMut ChromeosdeviceGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/devices/chromeos/{deviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDeviceChromeoReadonly.as_ref().to_string(), ()); } @@ -16941,7 +16965,7 @@ impl<'a, C, A> ChromeosdeviceActionCall<'a, C, A> where C: BorrowMut GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -17447,7 +17471,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } @@ -17693,7 +17717,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -17957,7 +17981,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -18192,7 +18216,7 @@ impl<'a, C, A> GroupAliaseInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/aliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -18451,7 +18475,7 @@ impl<'a, C, A> GroupAliaseListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/aliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } @@ -18686,7 +18710,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroupReadonly.as_ref().to_string(), ()); } @@ -18928,7 +18952,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -19188,7 +19212,7 @@ impl<'a, C, A> GroupAliaseDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/admin/directory/v1/groups/{groupKey}/aliases/{alias}".to_string(); + let mut url = self.hub._base_url.clone() + "groups/{groupKey}/aliases/{alias}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryGroup.as_ref().to_string(), ()); } @@ -19425,7 +19449,7 @@ impl<'a, C, A> AspGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/asps/{codeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -19671,7 +19695,7 @@ impl<'a, C, A> AspDeleteCall<'a, C, A> where C: BorrowMut, A: oau } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps/{codeId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/asps/{codeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -19906,7 +19930,7 @@ impl<'a, C, A> AspListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/asps".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/asps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserSecurity.as_ref().to_string(), ()); } @@ -20141,7 +20165,7 @@ impl<'a, C, A> DomainListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domains".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domains"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomainReadonly.as_ref().to_string(), ()); } @@ -20378,7 +20402,7 @@ impl<'a, C, A> DomainGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domains/{domainName}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domains/{domainName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomainReadonly.as_ref().to_string(), ()); } @@ -20630,7 +20654,7 @@ impl<'a, C, A> DomainInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domains".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domains"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomain.as_ref().to_string(), ()); } @@ -20890,7 +20914,7 @@ impl<'a, C, A> DomainDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domains/{domainName}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domains/{domainName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomain.as_ref().to_string(), ()); } @@ -21132,7 +21156,7 @@ impl<'a, C, A> DomainAliaseInsertCall<'a, C, A> where C: BorrowMut DomainAliaseGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domainaliases/{domainAliasName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomainReadonly.as_ref().to_string(), ()); } @@ -21643,7 +21667,7 @@ impl<'a, C, A> DomainAliaseListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customer}/domainaliases".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customer}/domainaliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryDomainReadonly.as_ref().to_string(), ()); } @@ -21886,7 +21910,7 @@ impl<'a, C, A> DomainAliaseDeleteCall<'a, C, A> where C: BorrowMut SchemaGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas/{schemaKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschemaReadonly.as_ref().to_string(), ()); } @@ -22377,7 +22401,7 @@ impl<'a, C, A> SchemaUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas/{schemaKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } @@ -22646,7 +22670,7 @@ impl<'a, C, A> SchemaListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschemaReadonly.as_ref().to_string(), ()); } @@ -22890,7 +22914,7 @@ impl<'a, C, A> SchemaPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas/{schemaKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } @@ -23160,7 +23184,7 @@ impl<'a, C, A> SchemaDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas/{schemaKey}".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas/{schemaKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } @@ -23402,7 +23426,7 @@ impl<'a, C, A> SchemaInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/customer/{customerId}/schemas".to_string(); + let mut url = self.hub._base_url.clone() + "customer/{customerId}/schemas"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserschema.as_ref().to_string(), ()); } @@ -23671,7 +23695,7 @@ impl<'a, C, A> ResourceCalendarListCall<'a, C, A> where C: BorrowMut ResourceCalendarGetCall<'a, C, A> where C: BorrowMut ResourceCalendarInsertCall<'a, C, A> where C: BorrowMut ResourceCalendarPatchCall<'a, C, A> where C: BorrowMut ResourceCalendarUpdateCall<'a, C, A> where C: BorrowMut ResourceCalendarDeleteCall<'a, C, A> where C: BorrowMut UserUndeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/undelete".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/undelete"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -25479,7 +25503,7 @@ impl<'a, C, A> UserPhotoDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/photos/thumbnail"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -25711,7 +25735,7 @@ impl<'a, C, A> UserPhotoPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/photos/thumbnail"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -25975,7 +25999,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users".to_string(); + let mut url = self.hub._base_url.clone() + "users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -26215,7 +26239,7 @@ impl<'a, C, A> UserAliaseWatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/watch".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/aliases/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -26488,7 +26512,7 @@ impl<'a, C, A> UserPhotoUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/photos/thumbnail"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -26812,7 +26836,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/watch".to_string(); + let mut url = self.hub._base_url.clone() + "users/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -27131,7 +27155,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -27390,7 +27414,7 @@ impl<'a, C, A> UserPhotoGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/photos/thumbnail"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } @@ -27683,7 +27707,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users".to_string(); + let mut url = self.hub._base_url.clone() + "users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } @@ -27986,7 +28010,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserReadonly.as_ref().to_string(), ()); } @@ -28249,7 +28273,7 @@ impl<'a, C, A> UserAliaseInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/aliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -28513,7 +28537,7 @@ impl<'a, C, A> UserAliaseListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/aliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUserAliaReadonly.as_ref().to_string(), ()); } @@ -28761,7 +28785,7 @@ impl<'a, C, A> UserMakeAdminCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/makeAdmin".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/makeAdmin"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -29017,7 +29041,7 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -29277,7 +29301,7 @@ impl<'a, C, A> UserAliaseDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}/aliases/{alias}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}/aliases/{alias}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -29511,7 +29535,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/admin/directory/v1/users/{userKey}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DirectoryUser.as_ref().to_string(), ()); } @@ -29666,4 +29690,3 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/admin1_reports/src/lib.rs b/gen/admin1_reports/src/lib.rs index 082e253cc0..26b77bf734 100644 --- a/gen/admin1_reports/src/lib.rs +++ b/gen/admin1_reports/src/lib.rs @@ -196,7 +196,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -339,6 +339,8 @@ pub struct Reports { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Reports {} @@ -351,6 +353,8 @@ impl<'a, C, A> Reports client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/admin/reports/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -376,6 +380,26 @@ impl<'a, C, A> Reports self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/admin/reports/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1071,7 +1095,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/admin/reports/v1//admin/reports_v1/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "/admin/reports_v1/channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReportAuditReadonly.as_ref().to_string(), ()); } @@ -1338,7 +1362,7 @@ impl<'a, C, A> ActivityWatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch".to_string(); + let mut url = self.hub._base_url.clone() + "activity/users/{userKey}/applications/{applicationName}/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReportAuditReadonly.as_ref().to_string(), ()); } @@ -1705,7 +1729,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}".to_string(); + let mut url = self.hub._base_url.clone() + "activity/users/{userKey}/applications/{applicationName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReportAuditReadonly.as_ref().to_string(), ()); } @@ -2021,7 +2045,7 @@ impl<'a, C, A> CustomerUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> where C: BorrowMut UserUsageReportGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AdSense {} @@ -370,6 +372,8 @@ impl<'a, C, A> AdSense client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/adsense/v1.4/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -413,6 +417,26 @@ impl<'a, C, A> AdSense self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/adsense/v1.4/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2436,7 +2460,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/urlchannels".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/urlchannels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2697,7 +2721,7 @@ impl<'a, C, A> AdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AdunitGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/adunits/{adUnitId}".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/adunits/{adUnitId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3218,7 +3242,7 @@ impl<'a, C, A> AdunitListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/adunits".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/adunits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3476,7 +3500,7 @@ impl<'a, C, A> AdunitGetAdCodeCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/adunits/{adUnitId}/adcode".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/adunits/{adUnitId}/adcode"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3729,7 +3753,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients".to_string(); + let mut url = self.hub._base_url.clone() + "adclients"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3946,7 +3970,7 @@ impl<'a, C, A> AlertDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/adsense/v1.4/alerts/{alertId}".to_string(); + let mut url = self.hub._base_url.clone() + "alerts/{alertId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4174,7 +4198,7 @@ impl<'a, C, A> AlertListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/alerts".to_string(); + let mut url = self.hub._base_url.clone() + "alerts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4393,7 +4417,7 @@ impl<'a, C, A> SavedadstyleListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/savedadstyles".to_string(); + let mut url = self.hub._base_url.clone() + "savedadstyles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4611,7 +4635,7 @@ impl<'a, C, A> SavedadstyleGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/savedadstyles/{savedAdStyleId}".to_string(); + let mut url = self.hub._base_url.clone() + "savedadstyles/{savedAdStyleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4854,7 +4878,7 @@ impl<'a, C, A> ReportSavedListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/reports/saved".to_string(); + let mut url = self.hub._base_url.clone() + "reports/saved"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5155,7 +5179,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/adsense/v1.4/reports".to_string(); + let mut url = self.hub._base_url.clone() + "reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5469,7 +5493,7 @@ impl<'a, C, A> ReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountAlertDeleteCall<'a, C, A> where C: BorrowMut AccountAlertListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/accounts/{accountId}/alerts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/alerts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6225,7 +6249,7 @@ impl<'a, C, A> AccountReportSavedGenerateCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6717,7 +6741,7 @@ impl<'a, C, A> AccountPaymentListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleGetCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7462,7 +7486,7 @@ impl<'a, C, A> AccountCustomchannelGetCall<'a, C, A> where C: BorrowMut AccountCustomchannelAdunitListCall<'a, C, A> where C: BorrowMut AccountReportSavedListCall<'a, C, A> where C: BorrowMut AccountUrlchannelListCall<'a, C, A> where C: BorrowMut AccountAdunitListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/accounts/{accountId}/adclients/{adClientId}/adunits".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/adclients/{adClientId}/adunits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8903,7 +8927,7 @@ impl<'a, C, A> AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountCustomchannelListCall<'a, C, A> where C: BorrowMut AccountSavedadstyleListCall<'a, C, A> where C: BorrowMut AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountAdunitCustomchannelListCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10801,7 +10825,7 @@ impl<'a, C, A> PaymentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/payments".to_string(); + let mut url = self.hub._base_url.clone() + "payments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11003,7 +11027,7 @@ impl<'a, C, A> MetadataDimensionListCall<'a, C, A> where C: BorrowMut MetadataMetricListCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/customchannels/{customChannelId}".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/customchannels/{customChannelId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11666,7 +11690,7 @@ impl<'a, C, A> CustomchannelListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/customchannels".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/customchannels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11932,7 +11956,7 @@ impl<'a, C, A> CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut CustomchannelAdunitListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AdSenseHost {} @@ -342,6 +344,8 @@ impl<'a, C, A> AdSenseHost client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/adsensehost/v4.1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -373,6 +377,26 @@ impl<'a, C, A> AdSenseHost self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/adsensehost/v4.1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1757,7 +1781,7 @@ impl<'a, C, A> UrlchannelInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}/urlchannels".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/urlchannels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2018,7 +2042,7 @@ impl<'a, C, A> UrlchannelDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}/urlchannels/{urlChannelId}".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/urlchannels/{urlChannelId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2273,7 +2297,7 @@ impl<'a, C, A> UrlchannelListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}/urlchannels".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/urlchannels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2530,7 +2554,7 @@ impl<'a, C, A> AdclientListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients".to_string(); + let mut url = self.hub._base_url.clone() + "adclients"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2748,7 +2772,7 @@ impl<'a, C, A> AdclientGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2999,7 +3023,7 @@ impl<'a, C, A> AssociationsessionStartCall<'a, C, A> where C: BorrowMut AssociationsessionVerifyCall<'a, C, A> where C: BorrowMut ReportGenerateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/reports".to_string(); + let mut url = self.hub._base_url.clone() + "reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3791,7 +3815,7 @@ impl<'a, C, A> AccountAdunitListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/adclients/{adClientId}/adunits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4061,7 +4085,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4287,7 +4311,7 @@ impl<'a, C, A> AccountAdunitGetAdCodeCall<'a, C, A> where C: BorrowMut AccountReportGenerateCall<'a, C, A> where C: BorrowMut AccountAdunitDeleteCall<'a, C, A> where C: BorrowMut AccountAdclientListCall<'a, C, A> where C: BorrowMut AccountAdunitPatchCall<'a, C, A> where C: BorrowMut AccountAdclientGetCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6204,7 +6228,7 @@ impl<'a, C, A> AccountAdunitInsertCall<'a, C, A> where C: BorrowMut AccountAdunitGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6741,7 +6765,7 @@ impl<'a, C, A> AccountAdunitUpdateCall<'a, C, A> where C: BorrowMut CustomchannelGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}/customchannels/{customChannelId}".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/customchannels/{customChannelId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7259,7 +7283,7 @@ impl<'a, C, A> CustomchannelDeleteCall<'a, C, A> where C: BorrowMut CustomchannelUpdateCall<'a, C, A> where C: BorrowMut CustomchannelListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/adsensehost/v4.1/adclients/{adClientId}/customchannels".to_string(); + let mut url = self.hub._base_url.clone() + "adclients/{adClientId}/customchannels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8038,7 +8062,7 @@ impl<'a, C, A> CustomchannelPatchCall<'a, C, A> where C: BorrowMut CustomchannelInsertCall<'a, C, A> where C: BorrowMut CustomchannelInsertCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Analytics {} @@ -354,6 +356,8 @@ impl<'a, C, A> Analytics client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/analytics/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -379,6 +383,26 @@ impl<'a, C, A> Analytics self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/analytics/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -5572,7 +5596,7 @@ impl<'a, C, A> ManagementWebpropertyInsertCall<'a, C, A> where C: BorrowMut ManagementProfileGetCall<'a, C, A> where C: BorrowMut ManagementAccountListCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -6621,7 +6645,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkDeleteCall<'a, C, A> where C: Borrow } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -6871,7 +6895,7 @@ impl<'a, C, A> ManagementProfileUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -7139,7 +7163,7 @@ impl<'a, C, A> ManagementProfileUserLinkUpdateCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -7435,7 +7459,7 @@ impl<'a, C, A> ManagementFilterInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkUpdateCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -7978,7 +8002,7 @@ impl<'a, C, A> ManagementProfileFilterLinkGetCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUserLinkUpdateCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -8544,7 +8568,7 @@ impl<'a, C, A> ManagementUnsampledReportInsertCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8828,7 +8852,7 @@ impl<'a, C, A> ManagementProfileFilterLinkDeleteCall<'a, C, A> where C: BorrowMu } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -9094,7 +9118,7 @@ impl<'a, C, A> ManagementRemarketingAudienceUpdateCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -9377,7 +9401,7 @@ impl<'a, C, A> ManagementCustomMetricGetCall<'a, C, A> where C: BorrowMut ManagementUploadGetCall<'a, C, A> where C: BorrowMut ManagementExperimentPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUserLinkListCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUserReadonly.as_ref().to_string(), ()); } @@ -10489,7 +10513,7 @@ impl<'a, C, A> ManagementProfileFilterLinkUpdateCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -10784,7 +10808,7 @@ impl<'a, C, A> ManagementExperimentGetCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionUpdateCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -11357,7 +11381,7 @@ impl<'a, C, A> ManagementUnsampledReportGetCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -11921,7 +11945,7 @@ impl<'a, C, A> ManagementFilterUpdateCall<'a, C, A> where C: BorrowMut ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkListCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -12840,7 +12864,7 @@ impl<'a, C, A> ManagementExperimentInsertCall<'a, C, A> where C: BorrowMut ManagementSegmentListCall<'a, C, A> where C: BorrowMut ManagementProfileDeleteCall<'a, C, A> where C: BorrowMut ManagementGoalPatchCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionPatchCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkGetCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -14470,7 +14494,7 @@ impl<'a, C, A> ManagementExperimentListCall<'a, C, A> where C: BorrowMut ManagementProfileListCall<'a, C, A> where C: BorrowMut ManagementGoalListCall<'a, C, A> where C: BorrowMut ManagementGoalInsertCall<'a, C, A> where C: BorrowMut ManagementCustomMetricPatchCall<'a, C, A> where C: BorrowMut ManagementProfileFilterLinkListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -16175,7 +16199,7 @@ impl<'a, C, A> ManagementAccountUserLinkInsertCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/entityUserLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -16443,7 +16467,7 @@ impl<'a, C, A> ManagementWebpropertyUserLinkInsertCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -16721,7 +16745,7 @@ impl<'a, C, A> ManagementCustomMetricInsertCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportDeleteCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -17261,7 +17285,7 @@ impl<'a, C, A> ManagementProfilePatchCall<'a, C, A> where C: BorrowMut ManagementFilterGetCall<'a, C, A> where C: BorrowMut ManagementAccountSummaryListCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionListCall<'a, C, A> where C: BorrowMut ManagementUploadListCall<'a, C, A> where C: BorrowMut ManagementProfileUserLinkListCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudienceInsertCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -19131,7 +19155,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkDeleteCall<'a, C, A> where C: Bor } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -19386,7 +19410,7 @@ impl<'a, C, A> ManagementUploadDeleteUploadDataCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19664,7 +19688,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkInsertCall<'a, C, A> where C: Bor params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -19938,7 +19962,7 @@ impl<'a, C, A> ManagementExperimentDeleteCall<'a, C, A> where C: BorrowMut ManagementGoalUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDataSourceListCall<'a, C, A> where C: BorrowMut ManagementCustomMetricListCall<'a, C, A> where C: BorrowMut ManagementUnsampledReportListCall<'a, C, A> where C: BorrowMut ManagementWebpropertyGetCall<'a, C, A> where C: BorrowMut ManagementProfileUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionGetCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudienceGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -22384,7 +22408,7 @@ impl<'a, C, A> ManagementWebpropertyPatchCall<'a, C, A> where C: BorrowMut ManagementWebpropertyUpdateCall<'a, C, A> where C: BorrowMut ManagementCustomDimensionInsertCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -23210,7 +23234,7 @@ impl<'a, C, A> ManagementAccountUserLinkDeleteCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/entityUserLinks/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/entityUserLinks/{linkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -23456,7 +23480,7 @@ impl<'a, C, A> ManagementProfileUserLinkInsertCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageUser.as_ref().to_string(), ()); } @@ -23748,7 +23772,7 @@ impl<'a, C, A> ManagementExperimentUpdateCall<'a, C, A> where C: BorrowMut ManagementWebpropertyListCall<'a, C, A> where C: BorrowMut ManagementWebPropertyAdWordsLinkPatchCall<'a, C, A> where C: Borr params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -24592,7 +24616,7 @@ impl<'a, C, A> ManagementGoalGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -24873,7 +24897,7 @@ impl<'a, C, A> ManagementCustomMetricUpdateCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudiencePatchCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -25460,7 +25484,7 @@ impl<'a, C, A> ManagementWebPropertyAdWordsLinkUpdateCall<'a, C, A> where C: Bor params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Edit.as_ref().to_string(), ()); } @@ -25748,7 +25772,7 @@ impl<'a, C, A> ManagementFilterPatchCall<'a, C, A> where C: BorrowMut ManagementFilterListCall<'a, C, A> where C: BorrowMut ManagementFilterDeleteCall<'a, C, A> where C: BorrowMut ManagementProfileInsertCall<'a, C, A> where C: BorrowMut ManagementAccountUserLinkListCall<'a, C, A> where C: BorrowMut ManagementRemarketingAudienceListCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences".to_string(); + let mut url = self.hub._base_url.clone() + "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -27378,7 +27402,7 @@ impl<'a, C, A> DataMcfGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/data/mcf".to_string(); + let mut url = self.hub._base_url.clone() + "data/mcf"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -27715,7 +27739,7 @@ impl<'a, C, A> DataGaGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/data/ga".to_string(); + let mut url = self.hub._base_url.clone() + "data/ga"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -28044,7 +28068,7 @@ impl<'a, C, A> DataRealtimeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/data/realtime".to_string(); + let mut url = self.hub._base_url.clone() + "data/realtime"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -28301,7 +28325,7 @@ impl<'a, C, A> ProvisioningCreateAccountTicketCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/analytics/v3/provisioning/createAccountTicket".to_string(); + let mut url = self.hub._base_url.clone() + "provisioning/createAccountTicket"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Provision.as_ref().to_string(), ()); } @@ -28529,7 +28553,7 @@ impl<'a, C, A> MetadataColumnListCall<'a, C, A> where C: BorrowMut MetadataColumnListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AndroidEnterprise {} @@ -354,6 +356,8 @@ impl<'a, C, A> AndroidEnterprise client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/androidenterprise/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -415,6 +419,26 @@ impl<'a, C, A> AndroidEnterprise self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/androidenterprise/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -4490,7 +4514,7 @@ impl<'a, C, A> StorelayoutpageDeleteCall<'a, C, A> where C: BorrowMut StorelayoutpagePatchCall<'a, C, A> where C: BorrowMut StorelayoutpageInsertCall<'a, C, A> where C: BorrowMut StorelayoutpageUpdateCall<'a, C, A> where C: BorrowMut StorelayoutpageGetCall<'a, C, A> where C: BorrowMut StorelayoutpageListCall<'a, C, A> where C: BorrowMut CollectionviewerGetCall<'a, C, A> where C: BorrowMut CollectionviewerPatchCall<'a, C, A> where C: BorrowMut CollectionviewerListCall<'a, C, A> where C: BorrowMut CollectionviewerDeleteCall<'a, C, A> where C: BorrowMut CollectionviewerUpdateCall<'a, C, A> where C: BorrowMut UserRevokeTokenCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/token".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/token"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7610,7 +7634,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7890,7 +7914,7 @@ impl<'a, C, A> UserPatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8168,7 +8192,7 @@ impl<'a, C, A> UserSetAvailableProductSetCall<'a, C, A> where C: BorrowMut UserGetAvailableProductSetCall<'a, C, A> where C: BorrowMut UserGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8941,7 +8965,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9204,7 +9228,7 @@ impl<'a, C, A> UserGenerateTokenCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/token".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/token"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9450,7 +9474,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9687,7 +9711,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9936,7 +9960,7 @@ impl<'a, C, A> UserGenerateAuthenticationTokenCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/authenticationToken"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10194,7 +10218,7 @@ impl<'a, C, A> InstallPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10488,7 +10512,7 @@ impl<'a, C, A> InstallDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10749,7 +10773,7 @@ impl<'a, C, A> InstallGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11018,7 +11042,7 @@ impl<'a, C, A> InstallListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11286,7 +11310,7 @@ impl<'a, C, A> InstallUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11577,7 +11601,7 @@ impl<'a, C, A> GrouplicenseGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11822,7 +11846,7 @@ impl<'a, C, A> GrouplicenseListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/groupLicenses"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12070,7 +12094,7 @@ impl<'a, C, A> ManagedconfigurationsfordeviceUpdateCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12372,7 +12396,7 @@ impl<'a, C, A> ManagedconfigurationsfordevicePatchCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12665,7 +12689,7 @@ impl<'a, C, A> ManagedconfigurationsfordeviceListCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12925,7 +12949,7 @@ impl<'a, C, A> ManagedconfigurationsfordeviceDeleteCall<'a, C, A> where C: Borro } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13186,7 +13210,7 @@ impl<'a, C, A> ManagedconfigurationsfordeviceGetCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13462,7 +13486,7 @@ impl<'a, C, A> DeviceSetStateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13745,7 +13769,7 @@ impl<'a, C, A> DeviceGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14004,7 +14028,7 @@ impl<'a, C, A> DeviceGetStateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14261,7 +14285,7 @@ impl<'a, C, A> DeviceListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/devices"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14513,7 +14537,7 @@ impl<'a, C, A> EnterpriseInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14758,7 +14782,7 @@ impl<'a, C, A> EnterpriseSetStoreLayoutCall<'a, C, A> where C: BorrowMut EnterprisePullNotificationSetCall<'a, C, A> where C: BorrowMut EnterpriseEnrollCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/enroll".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/enroll"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15490,7 +15514,7 @@ impl<'a, C, A> EnterpriseSetAccountCall<'a, C, A> where C: BorrowMut EnterpriseCreateWebTokenCall<'a, C, A> where C: BorrowMut EnterpriseListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16229,7 +16253,7 @@ impl<'a, C, A> EnterpriseGetStoreLayoutCall<'a, C, A> where C: BorrowMut EnterpriseCompleteSignupCall<'a, C, A> where C: BorrowMut EnterpriseGetServiceAccountCall<'a, C, A> where C: BorrowMut EnterpriseAcknowledgeNotificationSetCall<'a, C, A> where C: Borro } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/acknowledgeNotificationSet".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/acknowledgeNotificationSet"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17145,7 +17169,7 @@ impl<'a, C, A> EnterpriseUnenrollCall<'a, C, A> where C: BorrowMut EnterpriseSendTestPushNotificationCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/sendTestPushNotification"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17605,7 +17629,7 @@ impl<'a, C, A> EnterpriseGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17839,7 +17863,7 @@ impl<'a, C, A> EnterpriseDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18067,7 +18091,7 @@ impl<'a, C, A> EnterpriseGenerateSignupUrlCall<'a, C, A> where C: BorrowMut StorelayoutclusterListCall<'a, C, A> where C: BorrowMut StorelayoutclusterPatchCall<'a, C, A> where C: BorrowMut StorelayoutclusterUpdateCall<'a, C, A> where C: BorrowMut StorelayoutclusterGetCall<'a, C, A> where C: BorrowMut StorelayoutclusterInsertCall<'a, C, A> where C: BorrowMut StorelayoutclusterDeleteCall<'a, C, A> where C: BorrowMut ProductGetPermissionCall<'a, C, A> where C: BorrowMut ProductUnapproveCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/unapprove".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/products/{productId}/unapprove"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -20384,7 +20408,7 @@ impl<'a, C, A> ProductApproveCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/approve".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/products/{productId}/approve"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -20654,7 +20678,7 @@ impl<'a, C, A> ProductUpdatePermissionCall<'a, C, A> where C: BorrowMut ProductGetAppRestrictionsSchemaCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -21207,7 +21231,7 @@ impl<'a, C, A> ProductListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/products"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -21484,7 +21508,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/products/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -21745,7 +21769,7 @@ impl<'a, C, A> ProductGenerateApprovalUrlCall<'a, C, A> where C: BorrowMut ManagedconfigurationsforuserPatchCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -22289,7 +22313,7 @@ impl<'a, C, A> ManagedconfigurationsforuserListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -22537,7 +22561,7 @@ impl<'a, C, A> ManagedconfigurationsforuserDeleteCall<'a, C, A> where C: BorrowM } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -22793,7 +22817,7 @@ impl<'a, C, A> ManagedconfigurationsforuserUpdateCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23076,7 +23100,7 @@ impl<'a, C, A> ManagedconfigurationsforuserGetCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23333,7 +23357,7 @@ impl<'a, C, A> GrouplicenseuserListCall<'a, C, A> where C: BorrowMut EntitlementListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/entitlements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23841,7 +23865,7 @@ impl<'a, C, A> EntitlementUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24131,7 +24155,7 @@ impl<'a, C, A> EntitlementGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24389,7 +24413,7 @@ impl<'a, C, A> EntitlementDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24650,7 +24674,7 @@ impl<'a, C, A> EntitlementPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24945,7 +24969,7 @@ impl<'a, C, A> CollectionPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections/{collectionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25214,7 +25238,7 @@ impl<'a, C, A> CollectionListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25451,7 +25475,7 @@ impl<'a, C, A> CollectionGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections/{collectionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25697,7 +25721,7 @@ impl<'a, C, A> CollectionDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections/{collectionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25939,7 +25963,7 @@ impl<'a, C, A> CollectionInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26207,7 +26231,7 @@ impl<'a, C, A> CollectionUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/enterprises/{enterpriseId}/collections/{collectionId}".to_string(); + let mut url = self.hub._base_url.clone() + "enterprises/{enterpriseId}/collections/{collectionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26476,7 +26500,7 @@ impl<'a, C, A> ServiceaccountkeyListCall<'a, C, A> where C: BorrowMut ServiceaccountkeyInsertCall<'a, C, A> where C: BorrowMut ServiceaccountkeyDeleteCall<'a, C, A> where C: BorrowMut PermissionGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidenterprise/v1/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -27392,4 +27416,3 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/androidpublisher2/src/lib.rs b/gen/androidpublisher2/src/lib.rs index e02a594455..b35743853d 100644 --- a/gen/androidpublisher2/src/lib.rs +++ b/gen/androidpublisher2/src/lib.rs @@ -195,7 +195,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -327,6 +327,8 @@ pub struct AndroidPublisher { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AndroidPublisher {} @@ -339,6 +341,8 @@ impl<'a, C, A> AndroidPublisher client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/androidpublisher/v2/applications/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -367,6 +371,26 @@ impl<'a, C, A> AndroidPublisher self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/androidpublisher/v2/applications/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -3209,7 +3233,7 @@ impl<'a, C, A> EntitlementListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/entitlements".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/entitlements"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3451,7 +3475,7 @@ impl<'a, C, A> PurchaseSubscriptionRevokeCall<'a, C, A> where C: BorrowMut PurchaseProductGetCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionGetCall<'a, C, A> where C: BorrowMut PurchaseVoidedpurchaseListCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionCancelCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionRefundCall<'a, C, A> where C: BorrowMut PurchaseSubscriptionDeferCall<'a, C, A> where C: BorrowMut EditDeobfuscationfileUploadCall<'a, C, A> where C: BorrowMut EditImageUploadCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}", "resumable") } else { unreachable!() }; @@ -6063,7 +6087,7 @@ impl<'a, C, A> EditExpansionfileUpdateCall<'a, C, A> where C: BorrowMut EditDetailGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/details".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/details"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6599,7 +6623,7 @@ impl<'a, C, A> EditListingDeleteallCall<'a, C, A> where C: BorrowMut EditApkAddexternallyhostedCall<'a, C, A> where C: BorrowMut EditApklistingDeleteallCall<'a, C, A> where C: BorrowMut EditDetailUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/details".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/details"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7642,7 +7666,7 @@ impl<'a, C, A> EditTrackGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/tracks/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/tracks/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7910,7 +7934,7 @@ impl<'a, C, A> EditExpansionfilePatchCall<'a, C, A> where C: BorrowMut EditImageListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}/{imageType}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8479,7 +8503,7 @@ impl<'a, C, A> EditTrackUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/tracks/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/tracks/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8769,7 +8793,7 @@ impl<'a, C, A> EditListingPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9050,7 +9074,7 @@ impl<'a, C, A> EditGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9302,7 +9326,7 @@ impl<'a, C, A> EditImageDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}/{imageType}/{imageId}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}/{imageType}/{imageId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9570,9 +9594,9 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks", "resumable") } else { unreachable!() }; @@ -9933,7 +9957,7 @@ impl<'a, C, A> EditApklistingUpdateCall<'a, C, A> where C: BorrowMut EditApkListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/apks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10480,7 +10504,7 @@ impl<'a, C, A> EditApklistingPatchCall<'a, C, A> where C: BorrowMut EditListingGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11033,7 +11057,7 @@ impl<'a, C, A> EditApklistingDeleteCall<'a, C, A> where C: BorrowMut EditTesterGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/testers/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/testers/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11545,7 +11569,7 @@ impl<'a, C, A> EditDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11790,9 +11814,9 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut EditInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12427,7 +12451,7 @@ impl<'a, C, A> EditListingListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12681,7 +12705,7 @@ impl<'a, C, A> EditTesterPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/testers/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/testers/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12961,7 +12985,7 @@ impl<'a, C, A> EditCommitCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}:commit".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}:commit"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13208,7 +13232,7 @@ impl<'a, C, A> EditTrackListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/tracks".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/tracks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13455,7 +13479,7 @@ impl<'a, C, A> EditValidateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}:validate".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}:validate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13711,7 +13735,7 @@ impl<'a, C, A> EditListingUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13996,7 +14020,7 @@ impl<'a, C, A> EditExpansionfileGetCall<'a, C, A> where C: BorrowMut EditImageDeleteallCall<'a, C, A> where C: BorrowMut EditDetailPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/details".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/details"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14819,7 +14843,7 @@ impl<'a, C, A> EditTrackPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/tracks/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/tracks/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15101,7 +15125,7 @@ impl<'a, C, A> EditListingDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/listings/{language}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/listings/{language}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15352,7 +15376,7 @@ impl<'a, C, A> EditApklistingGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/apks/{apkVersionCode}/listings/{language}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15626,7 +15650,7 @@ impl<'a, C, A> EditTesterUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/edits/{editId}/testers/{track}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/edits/{editId}/testers/{track}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15908,7 +15932,7 @@ impl<'a, C, A> EditApklistingListCall<'a, C, A> where C: BorrowMut ReviewReplyCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/reviews/{reviewId}:reply".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/reviews/{reviewId}:reply"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16447,7 +16471,7 @@ impl<'a, C, A> ReviewGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/reviews/{reviewId}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/reviews/{reviewId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16717,7 +16741,7 @@ impl<'a, C, A> ReviewListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/reviews".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/reviews"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16979,7 +17003,7 @@ impl<'a, C, A> InappproductBatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/inappproducts/batch".to_string(); + let mut url = self.hub._base_url.clone() + "inappproducts/batch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17222,7 +17246,7 @@ impl<'a, C, A> InappproductListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/inappproducts".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/inappproducts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17487,7 +17511,7 @@ impl<'a, C, A> InappproductInsertCall<'a, C, A> where C: BorrowMut InappproductDeleteCall<'a, C, A> where C: BorrowMut InappproductGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/inappproducts/{sku}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/inappproducts/{sku}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18249,7 +18273,7 @@ impl<'a, C, A> InappproductUpdateCall<'a, C, A> where C: BorrowMut InappproductPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/androidpublisher/v2/applications/{packageName}/inappproducts/{sku}".to_string(); + let mut url = self.hub._base_url.clone() + "{packageName}/inappproducts/{sku}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18745,4 +18769,3 @@ impl<'a, C, A> InappproductPatchCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/appengine1/src/lib.rs b/gen/appengine1/src/lib.rs index 374fbc587a..faa4972739 100644 --- a/gen/appengine1/src/lib.rs +++ b/gen/appengine1/src/lib.rs @@ -186,7 +186,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -325,6 +325,8 @@ pub struct Appengine { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Appengine {} @@ -337,6 +339,8 @@ impl<'a, C, A> Appengine client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://appengine.googleapis.com/".to_string(), + _root_url: "https://appengine.googleapis.com/".to_string(), } } @@ -353,6 +357,26 @@ impl<'a, C, A> Appengine self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1882,7 +1906,7 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut AppRepairCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}:repair".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}:repair"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2726,7 +2750,7 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut AppServiceGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -3286,7 +3310,7 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3564,7 +3588,7 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3851,7 +3875,7 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut AppServiceVersionListCall<'a, C, A> where C: BorrowMut AppOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/operations/{operationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/operations/{operationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -4695,7 +4719,7 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/services".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/services"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -4965,7 +4989,7 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/locations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/locations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5233,7 +5257,7 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5785,7 +5809,7 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut AppLocationGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/locations/{locationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/locations/{locationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -6318,7 +6342,7 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6607,7 +6631,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -6850,7 +6874,7 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7106,7 +7130,7 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1/apps".to_string(); + let mut url = self.hub._base_url.clone() + "v1/apps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7349,7 +7373,7 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut AppServiceVersionGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Appengine {} @@ -340,6 +342,8 @@ impl<'a, C, A> Appengine client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://appengine.googleapis.com/".to_string(), + _root_url: "https://appengine.googleapis.com/".to_string(), } } @@ -356,6 +360,26 @@ impl<'a, C, A> Appengine self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1856,7 +1880,7 @@ impl<'a, C, A> AppModulePatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/modules/{modulesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/modules/{modulesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2147,7 +2171,7 @@ impl<'a, C, A> AppModuleGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/modules/{modulesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/modules/{modulesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -2404,7 +2428,7 @@ impl<'a, C, A> AppModuleVersionInstanceGetCall<'a, C, A> where C: BorrowMut AppModuleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/modules".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/modules"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -2945,7 +2969,7 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3193,7 +3217,7 @@ impl<'a, C, A> AppModuleVersionInstanceListCall<'a, C, A> where C: BorrowMut AppModuleVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut AppModuleVersionInstanceDebugCall<'a, C, A> where C: BorrowMut AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4308,7 +4332,7 @@ impl<'a, C, A> AppModuleDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/modules/{modulesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/modules/{modulesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4571,7 +4595,7 @@ impl<'a, C, A> AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4845,7 +4869,7 @@ impl<'a, C, A> AppOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/operations/{operationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/operations/{operationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5098,7 +5122,7 @@ impl<'a, C, A> AppLocationGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/locations/{locationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/locations/{locationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5364,7 +5388,7 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/locations".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/locations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5642,7 +5666,7 @@ impl<'a, C, A> AppModuleVersionPatchCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta4/apps/{appsId}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta4/apps/{appsId}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -6215,7 +6239,7 @@ impl<'a, C, A> AppModuleVersionDeleteCall<'a, C, A> where C: BorrowMut AppModuleVersionCreateCall<'a, C, A> where C: BorrowMut AppModuleVersionGetCall<'a, C, A> where C: BorrowMut AppModuleVersionListCall<'a, C, A> where C: BorrowMut AppModuleVersionListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Appengine {} @@ -336,6 +338,8 @@ impl<'a, C, A> Appengine client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://appengine.googleapis.com/".to_string(), + _root_url: "https://appengine.googleapis.com/".to_string(), } } @@ -352,6 +356,26 @@ impl<'a, C, A> Appengine self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://appengine.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1842,7 +1866,7 @@ impl<'a, C, A> AppServiceVersionInstanceListCall<'a, C, A> where C: BorrowMut AppServiceVersionCreateCall<'a, C, A> where C: BorrowMut AppPatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2698,7 +2722,7 @@ impl<'a, C, A> AppServiceVersionInstanceDebugCall<'a, C, A> where C: BorrowMut AppServiceGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -3252,7 +3276,7 @@ impl<'a, C, A> AppServiceVersionInstanceDeleteCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3539,7 +3563,7 @@ impl<'a, C, A> AppServiceVersionPatchCall<'a, C, A> where C: BorrowMut AppServiceVersionListCall<'a, C, A> where C: BorrowMut AppOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/operations/{operationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/operations/{operationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -4383,7 +4407,7 @@ impl<'a, C, A> AppServiceListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/services".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/services"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -4653,7 +4677,7 @@ impl<'a, C, A> AppLocationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/locations".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/locations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -4921,7 +4945,7 @@ impl<'a, C, A> AppServiceVersionInstanceGetCall<'a, C, A> where C: BorrowMut AppOperationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -5473,7 +5497,7 @@ impl<'a, C, A> AppServiceVersionDeleteCall<'a, C, A> where C: BorrowMut AppLocationGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/locations/{locationsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/locations/{locationsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Admin.as_ref().to_string(), ()); } @@ -6006,7 +6030,7 @@ impl<'a, C, A> AppServicePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6300,7 +6324,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6550,7 +6574,7 @@ impl<'a, C, A> AppServiceDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps/{appsId}/services/{servicesId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps/{appsId}/services/{servicesId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6806,7 +6830,7 @@ impl<'a, C, A> AppCreateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://appengine.googleapis.com/v1beta5/apps".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta5/apps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7049,7 +7073,7 @@ impl<'a, C, A> AppServiceVersionGetCall<'a, C, A> where C: BorrowMut AppServiceVersionGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Appsactivity {} @@ -337,6 +339,8 @@ impl<'a, C, A> Appsactivity client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/appsactivity/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -353,6 +357,26 @@ impl<'a, C, A> Appsactivity self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/appsactivity/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -756,7 +780,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/appsactivity/v1/activities".to_string(); + let mut url = self.hub._base_url.clone() + "activities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DriveMetadataReadonly.as_ref().to_string(), ()); } @@ -940,4 +964,3 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/appstate1/src/lib.rs b/gen/appstate1/src/lib.rs index 4421c8f99c..b3c2cf33d6 100644 --- a/gen/appstate1/src/lib.rs +++ b/gen/appstate1/src/lib.rs @@ -178,7 +178,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -310,6 +310,8 @@ pub struct AppState { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AppState {} @@ -322,6 +324,8 @@ impl<'a, C, A> AppState client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/appstate/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -338,6 +342,26 @@ impl<'a, C, A> AppState self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/appstate/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -644,7 +668,7 @@ impl<'a, C, A> StateDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/appstate/v1/states/{stateKey}".to_string(); + let mut url = self.hub._base_url.clone() + "states/{stateKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -869,7 +893,7 @@ impl<'a, C, A> StateGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/appstate/v1/states/{stateKey}".to_string(); + let mut url = self.hub._base_url.clone() + "states/{stateKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1109,7 +1133,7 @@ impl<'a, C, A> StateClearCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/appstate/v1/states/{stateKey}/clear".to_string(); + let mut url = self.hub._base_url.clone() + "states/{stateKey}/clear"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1354,7 +1378,7 @@ impl<'a, C, A> StateListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/appstate/v1/states".to_string(); + let mut url = self.hub._base_url.clone() + "states"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1577,7 +1601,7 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/appstate/v1/states/{stateKey}".to_string(); + let mut url = self.hub._base_url.clone() + "states/{stateKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1773,4 +1797,3 @@ impl<'a, C, A> StateUpdateCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/autoscaler1_beta2/src/lib.rs b/gen/autoscaler1_beta2/src/lib.rs index 242e4b3560..ffaf6eaddc 100644 --- a/gen/autoscaler1_beta2/src/lib.rs +++ b/gen/autoscaler1_beta2/src/lib.rs @@ -182,7 +182,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -314,6 +314,8 @@ pub struct AutoscalerHub { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for AutoscalerHub {} @@ -326,6 +328,8 @@ impl<'a, C, A> AutoscalerHub client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/autoscaler/v1beta2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -348,6 +352,26 @@ impl<'a, C, A> AutoscalerHub self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/autoscaler/v1beta2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1209,7 +1233,7 @@ impl<'a, C, A> ZoneListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/{project}/zones".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -1478,7 +1502,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/{project}/zones/{zone}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -1742,7 +1766,7 @@ impl<'a, C, A> ZoneOperationDeleteCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/{project}/zones/{zone}/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -2257,7 +2281,7 @@ impl<'a, C, A> AutoscalerListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -2531,7 +2555,7 @@ impl<'a, C, A> AutoscalerUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers/{autoscaler}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Compute.as_ref().to_string(), ()); } @@ -2821,7 +2845,7 @@ impl<'a, C, A> AutoscalerPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers/{autoscaler}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Compute.as_ref().to_string(), ()); } @@ -3104,7 +3128,7 @@ impl<'a, C, A> AutoscalerDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers/{autoscaler}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Compute.as_ref().to_string(), ()); } @@ -3368,7 +3392,7 @@ impl<'a, C, A> AutoscalerInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Compute.as_ref().to_string(), ()); } @@ -3641,7 +3665,7 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/autoscaler/v1beta2/projects/{project}/zones/{zone}/autoscalers/{autoscaler}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/zones/{zone}/autoscalers/{autoscaler}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -3826,4 +3850,3 @@ impl<'a, C, A> AutoscalerGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/bigquery2/src/lib.rs b/gen/bigquery2/src/lib.rs index 38a946ff98..f19459ea54 100644 --- a/gen/bigquery2/src/lib.rs +++ b/gen/bigquery2/src/lib.rs @@ -193,7 +193,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -348,6 +348,8 @@ pub struct Bigquery { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Bigquery {} @@ -360,6 +362,8 @@ impl<'a, C, A> Bigquery client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/bigquery/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -388,6 +392,26 @@ impl<'a, C, A> Bigquery self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/bigquery/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2686,7 +2710,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2974,7 +2998,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3255,7 +3279,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3517,7 +3541,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3766,7 +3790,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4032,7 +4056,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4320,7 +4344,7 @@ impl<'a, C, A> DatasetPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4591,7 +4615,7 @@ impl<'a, C, A> DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4856,7 +4880,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5128,7 +5152,7 @@ impl<'a, C, A> DatasetUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5403,7 +5427,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5652,7 +5676,7 @@ impl<'a, C, A> DatasetInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5913,7 +5937,7 @@ impl<'a, C, A> JobCancelCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/jobs/{jobId}/cancel"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6165,7 +6189,7 @@ impl<'a, C, A> JobQueryCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/queries".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/queries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6446,7 +6470,7 @@ impl<'a, C, A> JobGetQueryResultCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/queries/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/queries/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6746,7 +6770,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7019,7 +7043,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7275,9 +7299,9 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/bigquery/v2/projects/{projectId}/jobs".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/bigquery/v2/projects/{projectId}/jobs", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/bigquery/v2/projects/{projectId}/jobs".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/bigquery/v2/projects/{projectId}/jobs", "resumable") } else { unreachable!() }; @@ -7651,7 +7675,7 @@ impl<'a, C, A> TabledataInsertAllCall<'a, C, A> where C: BorrowMut TabledataListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8233,7 +8257,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/bigquery/v2/projects".to_string(); + let mut url = self.hub._base_url.clone() + "projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8381,4 +8405,3 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/blogger3/src/lib.rs b/gen/blogger3/src/lib.rs index f6fe1ee546..792c6ebc6d 100644 --- a/gen/blogger3/src/lib.rs +++ b/gen/blogger3/src/lib.rs @@ -203,7 +203,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -342,6 +342,8 @@ pub struct Blogger { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Blogger {} @@ -354,6 +356,8 @@ impl<'a, C, A> Blogger client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/blogger/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -391,6 +395,26 @@ impl<'a, C, A> Blogger self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/blogger/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2353,7 +2377,7 @@ impl<'a, C, A> PageViewGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pageviews".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pageviews"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2595,7 +2619,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/users/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2854,7 +2878,7 @@ impl<'a, C, A> BlogListByUserCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/users/{userId}/blogs".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/blogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3129,7 +3153,7 @@ impl<'a, C, A> BlogGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3383,7 +3407,7 @@ impl<'a, C, A> BlogGetByUrlCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/byurl".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/byurl"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3638,7 +3662,7 @@ impl<'a, C, A> PostUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3954,7 +3978,7 @@ impl<'a, C, A> PostGetByPathCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/bypath".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/bypath"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4235,7 +4259,7 @@ impl<'a, C, A> PostGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4530,7 +4554,7 @@ impl<'a, C, A> PostInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4817,7 +4841,7 @@ impl<'a, C, A> PostPublishCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/publish".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/publish"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5070,7 +5094,7 @@ impl<'a, C, A> PostDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5307,7 +5331,7 @@ impl<'a, C, A> PostRevertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/revert".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/revert"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5564,7 +5588,7 @@ impl<'a, C, A> PostSearchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/search".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5857,7 +5881,7 @@ impl<'a, C, A> PostPatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6213,7 +6237,7 @@ impl<'a, C, A> PostListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6528,7 +6552,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6794,7 +6818,7 @@ impl<'a, C, A> CommentRemoveContentCall<'a, C, A> where C: BorrowMut CommentListByBlogCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7362,7 +7386,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/comments/{commentId}/spam"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7656,7 +7680,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7954,7 +7978,7 @@ impl<'a, C, A> CommentApproveCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/comments/{commentId}/approve"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8212,7 +8236,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/posts/{postId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8466,7 +8490,7 @@ impl<'a, C, A> PostUserInfoGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/users/{userId}/blogs/{blogId}/posts/{postId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/blogs/{blogId}/posts/{postId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8777,7 +8801,7 @@ impl<'a, C, A> PostUserInfoListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/users/{userId}/blogs/{blogId}/posts".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/blogs/{blogId}/posts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9092,7 +9116,7 @@ impl<'a, C, A> BlogUserInfoGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/users/{userId}/blogs/{blogId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/blogs/{blogId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9351,7 +9375,7 @@ impl<'a, C, A> PageGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9629,7 +9653,7 @@ impl<'a, C, A> PageListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9901,7 +9925,7 @@ impl<'a, C, A> PageRevertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}/revert".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}/revert"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10158,7 +10182,7 @@ impl<'a, C, A> PageInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10443,7 +10467,7 @@ impl<'a, C, A> PagePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10728,7 +10752,7 @@ impl<'a, C, A> PagePublishCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}/publish".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}/publish"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10992,7 +11016,7 @@ impl<'a, C, A> PageUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11276,7 +11300,7 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages/{pageId}".to_string(); + let mut url = self.hub._base_url.clone() + "blogs/{blogId}/pages/{pageId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11441,4 +11465,3 @@ impl<'a, C, A> PageDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/books1/src/lib.rs b/gen/books1/src/lib.rs index 8bce9ff3e5..fb6c81cbd7 100644 --- a/gen/books1/src/lib.rs +++ b/gen/books1/src/lib.rs @@ -212,7 +212,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -350,6 +350,8 @@ pub struct Books { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Books {} @@ -362,6 +364,8 @@ impl<'a, C, A> Books client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/books/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -411,6 +415,26 @@ impl<'a, C, A> Books self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/books/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -4023,7 +4047,7 @@ impl<'a, C, A> LayerAnnotationDataGetCall<'a, C, A> where C: BorrowMut LayerVolumeAnnotationGetCall<'a, C, A> where C: BorrowMut LayerListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/volumes/{volumeId}/layersummary".to_string(); + let mut url = self.hub._base_url.clone() + "volumes/{volumeId}/layersummary"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4908,7 +4932,7 @@ impl<'a, C, A> LayerGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/volumes/{volumeId}/layersummary/{summaryId}".to_string(); + let mut url = self.hub._base_url.clone() + "volumes/{volumeId}/layersummary/{summaryId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5231,7 +5255,7 @@ impl<'a, C, A> LayerVolumeAnnotationListCall<'a, C, A> where C: BorrowMut LayerAnnotationDataListCall<'a, C, A> where C: BorrowMut VolumeRecommendedRateCall<'a, C, A> where C: BorrowMut VolumeGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/volumes/{volumeId}".to_string(); + let mut url = self.hub._base_url.clone() + "volumes/{volumeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6545,7 +6569,7 @@ impl<'a, C, A> VolumeMybookListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/volumes/mybooks".to_string(); + let mut url = self.hub._base_url.clone() + "volumes/mybooks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6865,7 +6889,7 @@ impl<'a, C, A> VolumeListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/volumes".to_string(); + let mut url = self.hub._base_url.clone() + "volumes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7202,7 +7226,7 @@ impl<'a, C, A> VolumeUseruploadedListCall<'a, C, A> where C: BorrowMut VolumeAssociatedListCall<'a, C, A> where C: BorrowMut VolumeRecommendedListCall<'a, C, A> where C: BorrowMut DictionaryListOfflineMetadataCall<'a, C, A> where C: BorrowMut SeryGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/series/get".to_string(); + let mut url = self.hub._base_url.clone() + "series/get"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8414,7 +8438,7 @@ impl<'a, C, A> SeryMembershipGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/series/membership/get".to_string(); + let mut url = self.hub._base_url.clone() + "series/membership/get"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8664,7 +8688,7 @@ impl<'a, C, A> BookshelveVolumeListCall<'a, C, A> where C: BorrowMut BookshelveListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/users/{userId}/bookshelves".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/bookshelves"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9191,7 +9215,7 @@ impl<'a, C, A> BookshelveGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/users/{userId}/bookshelves/{shelf}".to_string(); + let mut url = self.hub._base_url.clone() + "users/{userId}/bookshelves/{shelf}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9480,7 +9504,7 @@ impl<'a, C, A> PromoofferAcceptCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/books/v1/promooffer/accept".to_string(); + let mut url = self.hub._base_url.clone() + "promooffer/accept"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9761,7 +9785,7 @@ impl<'a, C, A> PromoofferDismisCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/books/v1/promooffer/dismiss".to_string(); + let mut url = self.hub._base_url.clone() + "promooffer/dismiss"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10032,7 +10056,7 @@ impl<'a, C, A> PromoofferGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/promooffer/get".to_string(); + let mut url = self.hub._base_url.clone() + "promooffer/get"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10291,7 +10315,7 @@ impl<'a, C, A> PersonalizedstreamGetCall<'a, C, A> where C: BorrowMut OnboardingListCategoryCall<'a, C, A> where C: BorrowMut OnboardingListCategoryVolumeCall<'a, C, A> where C: BorrowMut MyconfigRequestAccesCall<'a, C, A> where C: BorrowMut MyconfigReleaseDownloadAccesCall<'a, C, A> where C: BorrowMut MyconfigSyncVolumeLicenseCall<'a, C, A> where C: BorrowMut MyconfigGetUserSettingCall<'a, C, A> where C: BorrowMut MyconfigUpdateUserSettingCall<'a, C, A> where C: BorrowMut MylibraryBookshelveClearVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveMoveVolumeCall<'a, C, A> where C: BorrowMut MylibraryBookshelveVolumeListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationSummaryCall<'a, C, A> where C: BorrowMut MylibraryAnnotationDeleteCall<'a, C, A> where C: BorrowMut MylibraryBookshelveAddVolumeCall<'a, C, A> where C: BorrowMut MylibraryAnnotationInsertCall<'a, C, A> where C: BorrowMut MylibraryBookshelveRemoveVolumeCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/books/v1/mylibrary/bookshelves/{shelf}/removeVolume".to_string(); + let mut url = self.hub._base_url.clone() + "mylibrary/bookshelves/{shelf}/removeVolume"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14384,7 +14408,7 @@ impl<'a, C, A> MylibraryAnnotationListCall<'a, C, A> where C: BorrowMut MylibraryAnnotationUpdateCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionSetPositionCall<'a, C, A> where C: Borrow } - let mut url = "https://www.googleapis.com/books/v1/mylibrary/readingpositions/{volumeId}/setPosition".to_string(); + let mut url = self.hub._base_url.clone() + "mylibrary/readingpositions/{volumeId}/setPosition"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15238,7 +15262,7 @@ impl<'a, C, A> MylibraryBookshelveGetCall<'a, C, A> where C: BorrowMut MylibraryBookshelveListCall<'a, C, A> where C: BorrowMut MylibraryReadingpositionGetCall<'a, C, A> where C: BorrowMut NotificationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/books/v1/notification/get".to_string(); + let mut url = self.hub._base_url.clone() + "notification/get"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16209,7 +16233,7 @@ impl<'a, C, A> CloudloadingAddBookCall<'a, C, A> where C: BorrowMut CloudloadingUpdateBookCall<'a, C, A> where C: BorrowMut CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut CloudloadingDeleteBookCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CalendarHub {} @@ -393,6 +395,8 @@ impl<'a, C, A> CalendarHub client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/calendar/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -430,6 +434,26 @@ impl<'a, C, A> CalendarHub self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/calendar/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2546,7 +2570,7 @@ impl<'a, C, A> FreebusyQueryCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/freeBusy".to_string(); + let mut url = self.hub._base_url.clone() + "freeBusy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2787,7 +2811,7 @@ impl<'a, C, A> SettingListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/settings".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/settings"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3035,7 +3059,7 @@ impl<'a, C, A> SettingWatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/settings/watch".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/settings/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3287,7 +3311,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/settings/{setting}".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/settings/{setting}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3534,7 +3558,7 @@ impl<'a, C, A> CalendarListUpdateCall<'a, C, A> where C: BorrowMut CalendarListDeleteCall<'a, C, A> where C: BorrowMut CalendarListGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/calendarList/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/calendarList/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4287,7 +4311,7 @@ impl<'a, C, A> CalendarListListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/calendarList".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/calendarList"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4547,7 +4571,7 @@ impl<'a, C, A> CalendarListInsertCall<'a, C, A> where C: BorrowMut CalendarListPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/calendarList/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/calendarList/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5095,7 +5119,7 @@ impl<'a, C, A> CalendarListWatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/users/me/calendarList/watch".to_string(); + let mut url = self.hub._base_url.clone() + "users/me/calendarList/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5376,7 +5400,7 @@ impl<'a, C, A> CalendarPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5634,7 +5658,7 @@ impl<'a, C, A> CalendarDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5859,7 +5883,7 @@ impl<'a, C, A> CalendarGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6093,7 +6117,7 @@ impl<'a, C, A> CalendarClearCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/clear".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/clear"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6323,7 +6347,7 @@ impl<'a, C, A> CalendarInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars".to_string(); + let mut url = self.hub._base_url.clone() + "calendars"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6558,7 +6582,7 @@ impl<'a, C, A> CalendarUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6844,7 +6868,7 @@ impl<'a, C, A> AclWatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl/watch".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7141,7 +7165,7 @@ impl<'a, C, A> AclInsertCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7409,7 +7433,7 @@ impl<'a, C, A> AclUpdateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl/{ruleId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl/{ruleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7687,7 +7711,7 @@ impl<'a, C, A> AclPatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl/{ruleId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl/{ruleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7976,7 +8000,7 @@ impl<'a, C, A> AclListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8243,7 +8267,7 @@ impl<'a, C, A> AclDeleteCall<'a, C, A> where C: BorrowMut, A: oau } - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl/{ruleId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl/{ruleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8480,7 +8504,7 @@ impl<'a, C, A> AclGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl/{ruleId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/acl/{ruleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8729,7 +8753,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/calendar/v3/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8945,7 +8969,7 @@ impl<'a, C, A> ColorGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/colors".to_string(); + let mut url = self.hub._base_url.clone() + "colors"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9155,7 +9179,7 @@ impl<'a, C, A> EventDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9419,7 +9443,7 @@ impl<'a, C, A> EventInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9711,7 +9735,7 @@ impl<'a, C, A> EventImportCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/import".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/import"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10024,7 +10048,7 @@ impl<'a, C, A> EventInstanceCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}/instances".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}/instances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10349,7 +10373,7 @@ impl<'a, C, A> EventGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10704,7 +10728,7 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11102,7 +11126,7 @@ impl<'a, C, A> EventPatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11408,7 +11432,7 @@ impl<'a, C, A> EventMoveCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}/move".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}/move"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11699,7 +11723,7 @@ impl<'a, C, A> EventUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId}".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/{eventId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12092,7 +12116,7 @@ impl<'a, C, A> EventWatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/watch".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12492,7 +12516,7 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/quickAdd".to_string(); + let mut url = self.hub._base_url.clone() + "calendars/{calendarId}/events/quickAdd"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12674,4 +12698,3 @@ impl<'a, C, A> EventQuickAddCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/classroom1/src/lib.rs b/gen/classroom1/src/lib.rs index d57137f5cf..62b3077e55 100644 --- a/gen/classroom1/src/lib.rs +++ b/gen/classroom1/src/lib.rs @@ -205,7 +205,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -383,6 +383,8 @@ pub struct Classroom { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Classroom {} @@ -395,6 +397,8 @@ impl<'a, C, A> Classroom client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://classroom.googleapis.com/".to_string(), + _root_url: "https://classroom.googleapis.com/".to_string(), } } @@ -417,6 +421,26 @@ impl<'a, C, A> Classroom self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://classroom.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://classroom.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2443,7 +2467,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionPatchCall<'a, C, A> where C: Bor params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMe.as_ref().to_string(), ()); } @@ -2764,7 +2788,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionListCall<'a, C, A> where C: Borr params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMeReadonly.as_ref().to_string(), ()); } @@ -3051,7 +3075,7 @@ impl<'a, C, A> CourseGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseReadonly.as_ref().to_string(), ()); } @@ -3299,7 +3323,7 @@ impl<'a, C, A> CourseUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Course.as_ref().to_string(), ()); } @@ -3566,7 +3590,7 @@ impl<'a, C, A> CourseStudentDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/teachers/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/teachers/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -4092,7 +4116,7 @@ impl<'a, C, A> CourseCourseWorkListCall<'a, C, A> where C: BorrowMut CourseTeacherListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/teachers".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/teachers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -4638,7 +4662,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionTurnInCall<'a, C, A> where C: Bo params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMe.as_ref().to_string(), ()); } @@ -4934,7 +4958,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionModifyAttachmentCall<'a, C, A> w params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMe.as_ref().to_string(), ()); } @@ -5230,7 +5254,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReturnCall<'a, C, A> where C: Bo params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkStudent.as_ref().to_string(), ()); } @@ -5517,7 +5541,7 @@ impl<'a, C, A> CourseCourseWorkGetCall<'a, C, A> where C: BorrowMut CourseCourseWorkCreateCall<'a, C, A> where C: BorrowMut CourseListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseReadonly.as_ref().to_string(), ()); } @@ -6322,7 +6346,7 @@ impl<'a, C, A> CourseCourseWorkStudentSubmissionReclaimCall<'a, C, A> where C: B params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMe.as_ref().to_string(), ()); } @@ -6614,7 +6638,7 @@ impl<'a, C, A> CourseAliaseCreateCall<'a, C, A> where C: BorrowMut CourseStudentCreateCall<'a, C, A> where C: BorrowMut CourseAliaseDeleteCall<'a, C, A> where C: BorrowMut CourseCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Course.as_ref().to_string(), ()); } @@ -7665,7 +7689,7 @@ impl<'a, C, A> CourseStudentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/students".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/students"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -7920,7 +7944,7 @@ impl<'a, C, A> CourseDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Course.as_ref().to_string(), ()); } @@ -8173,7 +8197,7 @@ impl<'a, C, A> CoursePatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Course.as_ref().to_string(), ()); } @@ -8455,7 +8479,7 @@ impl<'a, C, A> CourseAliaseListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/aliases".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/aliases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseReadonly.as_ref().to_string(), ()); } @@ -8712,7 +8736,7 @@ impl<'a, C, A> CourseTeacherDeleteCall<'a, C, A> where C: BorrowMut CourseTeacherCreateCall<'a, C, A> where C: BorrowMut CourseCourseWorkStudentSubmissionGetCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CourseworkMeReadonly.as_ref().to_string(), ()); } @@ -9502,7 +9526,7 @@ impl<'a, C, A> CourseStudentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/courses/{courseId}/students/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/courses/{courseId}/students/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -9754,7 +9778,7 @@ impl<'a, C, A> UserProfileGuardianGetCall<'a, C, A> where C: BorrowMut UserProfileGuardianInvitationCreateCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/userProfiles/{studentId}/guardianInvitations"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -10234,7 +10258,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/userProfiles/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/userProfiles/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -10488,7 +10512,7 @@ impl<'a, C, A> UserProfileGuardianInvitationPatchCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -10750,7 +10774,7 @@ impl<'a, C, A> UserProfileGuardianInvitationGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -10994,7 +11018,7 @@ impl<'a, C, A> UserProfileGuardianListCall<'a, C, A> where C: BorrowMut UserProfileGuardianInvitationListCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/userProfiles/{studentId}/guardianInvitations"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -11506,7 +11530,7 @@ impl<'a, C, A> UserProfileGuardianDeleteCall<'a, C, A> where C: BorrowMut InvitationDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/invitations/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/invitations/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Roster.as_ref().to_string(), ()); } @@ -11995,7 +12019,7 @@ impl<'a, C, A> InvitationListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/invitations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/invitations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -12238,7 +12262,7 @@ impl<'a, C, A> InvitationCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/invitations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/invitations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Roster.as_ref().to_string(), ()); } @@ -12472,7 +12496,7 @@ impl<'a, C, A> InvitationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/invitations/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/invitations/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::RosterReadonly.as_ref().to_string(), ()); } @@ -12713,7 +12737,7 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://classroom.googleapis.com/v1/invitations/{id}:accept".to_string(); + let mut url = self.hub._base_url.clone() + "v1/invitations/{id}:accept"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Roster.as_ref().to_string(), ()); } @@ -12884,4 +12908,3 @@ impl<'a, C, A> InvitationAcceptCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/cloudbilling1/src/lib.rs b/gen/cloudbilling1/src/lib.rs index 2c39d03bd4..d0580d484b 100644 --- a/gen/cloudbilling1/src/lib.rs +++ b/gen/cloudbilling1/src/lib.rs @@ -176,7 +176,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -303,6 +303,8 @@ pub struct Cloudbilling { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Cloudbilling {} @@ -315,6 +317,8 @@ impl<'a, C, A> Cloudbilling client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://cloudbilling.googleapis.com/".to_string(), + _root_url: "https://cloudbilling.googleapis.com/".to_string(), } } @@ -334,6 +338,26 @@ impl<'a, C, A> Cloudbilling self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://cloudbilling.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://cloudbilling.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -689,7 +713,7 @@ impl<'a, C, A> BillingAccountGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://cloudbilling.googleapis.com/v1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -941,7 +965,7 @@ impl<'a, C, A> BillingAccountListCall<'a, C, A> where C: BorrowMut BillingAccountProjectListCall<'a, C, A> where C: BorrowMut ProjectGetBillingInfoCall<'a, C, A> where C: BorrowMut ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut ProjectUpdateBillingInfoCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudDebugger {} @@ -327,6 +329,8 @@ impl<'a, C, A> CloudDebugger client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://clouddebugger.googleapis.com/".to_string(), + _root_url: "https://clouddebugger.googleapis.com/".to_string(), } } @@ -346,6 +350,26 @@ impl<'a, C, A> CloudDebugger self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://clouddebugger.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://clouddebugger.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1233,7 +1257,7 @@ impl<'a, C, A> ControllerDebuggeeBreakpointUpdateCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://clouddebugger.googleapis.com/v2/controller/debuggees/{debuggeeId}/breakpoints/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1513,7 +1537,7 @@ impl<'a, C, A> ControllerDebuggeeRegisterCall<'a, C, A> where C: BorrowMut ControllerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://clouddebugger.googleapis.com/v2/controller/debuggees/{debuggeeId}/breakpoints".to_string(); + let mut url = self.hub._base_url.clone() + "v2/controller/debuggees/{debuggeeId}/breakpoints"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2019,7 +2043,7 @@ impl<'a, C, A> DebuggerDebuggeeBreakpointGetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointDeleteCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://clouddebugger.googleapis.com/v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2555,7 +2579,7 @@ impl<'a, C, A> DebuggerDebuggeeListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointSetCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut DebuggerDebuggeeBreakpointListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Cloudlatencytest {} @@ -316,6 +318,8 @@ impl<'a, C, A> Cloudlatencytest client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://cloudlatencytest-pa.googleapis.com/v2/statscollection/".to_string(), + _root_url: "https://cloudlatencytest-pa.googleapis.com/".to_string(), } } @@ -332,6 +336,26 @@ impl<'a, C, A> Cloudlatencytest self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://cloudlatencytest-pa.googleapis.com/v2/statscollection/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://cloudlatencytest-pa.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -627,7 +651,7 @@ impl<'a, C, A> StatscollectionUpdateaggregatedstatCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://cloudlatencytest-pa.googleapis.com/v2/statscollection/updateaggregatedstats".to_string(); + let mut url = self.hub._base_url.clone() + "updateaggregatedstats"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MonitoringReadonly.as_ref().to_string(), ()); } @@ -860,7 +884,7 @@ impl<'a, C, A> StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut StatscollectionUpdatestatCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudMonitoring {} @@ -335,6 +337,8 @@ impl<'a, C, A> CloudMonitoring client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -357,6 +361,26 @@ impl<'a, C, A> CloudMonitoring self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/cloudmonitoring/v2beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1159,7 +1183,7 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut TimeseryWriteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/timeseries:write".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/timeseries:write"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1818,7 +1842,7 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/timeseries/{metric}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/timeseries/{metric}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2185,7 +2209,7 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudResourceManager {} @@ -330,6 +332,8 @@ impl<'a, C, A> CloudResourceManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://cloudresourcemanager.googleapis.com/".to_string(), + _root_url: "https://cloudresourcemanager.googleapis.com/".to_string(), } } @@ -352,6 +356,26 @@ impl<'a, C, A> CloudResourceManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://cloudresourcemanager.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://cloudresourcemanager.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1633,7 +1657,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1887,7 +1911,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2970,7 +2994,7 @@ impl<'a, C, A> OrganizationSearchCall<'a, C, A> where C: BorrowMut ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectUndeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}:undelete".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}:undelete"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3802,7 +3826,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4325,7 +4349,7 @@ impl<'a, C, A> ProjectGetAncestryCall<'a, C, A> where C: BorrowMut ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4877,7 +4901,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5422,7 +5446,7 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5671,7 +5695,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1/projects".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5859,4 +5883,3 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/cloudresourcemanager1_beta1/src/lib.rs b/gen/cloudresourcemanager1_beta1/src/lib.rs index 803fbc2704..aa943e8b67 100644 --- a/gen/cloudresourcemanager1_beta1/src/lib.rs +++ b/gen/cloudresourcemanager1_beta1/src/lib.rs @@ -184,7 +184,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -316,6 +316,8 @@ pub struct CloudResourceManager { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudResourceManager {} @@ -328,6 +330,8 @@ impl<'a, C, A> CloudResourceManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://cloudresourcemanager.googleapis.com/".to_string(), + _root_url: "https://cloudresourcemanager.googleapis.com/".to_string(), } } @@ -347,6 +351,26 @@ impl<'a, C, A> CloudResourceManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://cloudresourcemanager.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://cloudresourcemanager.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1446,7 +1470,7 @@ impl<'a, C, A> OrganizationSetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationGetIamPolicyCall<'a, C, A> where C: BorrowMut OrganizationTestIamPermissionCall<'a, C, A> where C: BorrowMut OrganizationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2542,7 +2566,7 @@ impl<'a, C, A> OrganizationUpdateCall<'a, C, A> where C: BorrowMut OrganizationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/organizations".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/organizations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3080,7 +3104,7 @@ impl<'a, C, A> ProjectTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectUndeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}:undelete".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects/{projectId}:undelete"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3644,7 +3668,7 @@ impl<'a, C, A> ProjectCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3927,7 +3951,7 @@ impl<'a, C, A> ProjectSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4450,7 +4474,7 @@ impl<'a, C, A> ProjectGetAncestryCall<'a, C, A> where C: BorrowMut ProjectUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5002,7 +5026,7 @@ impl<'a, C, A> ProjectGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects/{projectId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5550,7 +5574,7 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://cloudresourcemanager.googleapis.com/v1beta1/projects".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5737,4 +5761,3 @@ impl<'a, C, A> ProjectListCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/clouduseraccountsvm_beta/src/lib.rs b/gen/clouduseraccountsvm_beta/src/lib.rs index 646c614a0b..ffe88a3a71 100644 --- a/gen/clouduseraccountsvm_beta/src/lib.rs +++ b/gen/clouduseraccountsvm_beta/src/lib.rs @@ -190,7 +190,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -333,6 +333,8 @@ pub struct CloudUserAccounts { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudUserAccounts {} @@ -345,6 +347,8 @@ impl<'a, C, A> CloudUserAccounts client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -370,6 +374,26 @@ impl<'a, C, A> CloudUserAccounts self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/clouduseraccounts/vm_beta/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1463,7 +1487,7 @@ impl<'a, C, A> GlobalAccountsOperationDeleteCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationListCall<'a, C, A> where C: BorrowMut GlobalAccountsOperationGetCall<'a, C, A> where C: BorrowMut UserAddPublicKeyCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/users/{user}/addPublicKey".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/users/{user}/addPublicKey"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2538,7 +2562,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/users".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudUseraccountReadonly.as_ref().to_string(), ()); } @@ -2820,7 +2844,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/users".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3081,7 +3105,7 @@ impl<'a, C, A> UserGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/users/{user}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/users/{user}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudUseraccountReadonly.as_ref().to_string(), ()); } @@ -3330,7 +3354,7 @@ impl<'a, C, A> UserRemovePublicKeyCall<'a, C, A> where C: BorrowMut UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/users/{user}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/users/{user}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3834,7 +3858,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups/{groupName}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups/{groupName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4081,7 +4105,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups/{groupName}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups/{groupName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudUseraccountReadonly.as_ref().to_string(), ()); } @@ -4335,7 +4359,7 @@ impl<'a, C, A> GroupAddMemberCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups/{groupName}/addMember".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups/{groupName}/addMember"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4611,7 +4635,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4890,7 +4914,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudUseraccountReadonly.as_ref().to_string(), ()); } @@ -5174,7 +5198,7 @@ impl<'a, C, A> GroupRemoveMemberCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/clouduseraccounts/vm_beta/projects/{project}/global/groups/{groupName}/removeMember".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/groups/{groupName}/removeMember"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5467,7 +5491,7 @@ impl<'a, C, A> LinuxGetLinuxAccountViewCall<'a, C, A> where C: BorrowMut LinuxGetAuthorizedKeysViewCall<'a, C, A> where C: BorrowMut LinuxGetAuthorizedKeysViewCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Container {} @@ -324,6 +326,8 @@ impl<'a, C, A> Container client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://container.googleapis.com/".to_string(), + _root_url: "https://container.googleapis.com/".to_string(), } } @@ -340,6 +344,26 @@ impl<'a, C, A> Container self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://container.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://container.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1148,7 +1172,7 @@ impl<'a, C, A> ProjectZoneClusterGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1711,7 +1735,7 @@ impl<'a, C, A> ProjectZoneClusterNodePoolGetCall<'a, C, A> where C: BorrowMut ProjectZoneClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectZoneGetServerconfigCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolListCall<'a, C, A> where C: BorrowMut ProjectZoneOperationGetCall<'a, C, A> where C: BorrowMut ProjectZoneOperationListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterCreateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterUpdateCall<'a, C, A> where C: BorrowMut ProjectZoneClusterListCall<'a, C, A> where C: BorrowMut ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://container.googleapis.com/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4323,4 +4347,3 @@ impl<'a, C, A> ProjectZoneClusterNodePoolDeleteCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/content2/src/lib.rs b/gen/content2/src/lib.rs index 27f15100c1..78dde74bff 100644 --- a/gen/content2/src/lib.rs +++ b/gen/content2/src/lib.rs @@ -211,7 +211,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -343,6 +343,8 @@ pub struct ShoppingContent { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for ShoppingContent {} @@ -355,6 +357,8 @@ impl<'a, C, A> ShoppingContent client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/content/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -401,6 +405,26 @@ impl<'a, C, A> ShoppingContent self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/content/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -6248,7 +6272,7 @@ impl<'a, C, A> AccounttaxCustombatchCall<'a, C, A> where C: BorrowMut AccounttaxPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounttax/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounttax/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6783,7 +6807,7 @@ impl<'a, C, A> AccounttaxListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounttax".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounttax"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7046,7 +7070,7 @@ impl<'a, C, A> AccounttaxUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounttax/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounttax/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7324,7 +7348,7 @@ impl<'a, C, A> AccounttaxGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounttax/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounttax/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7571,7 +7595,7 @@ impl<'a, C, A> DatafeedstatuseGetCall<'a, C, A> where C: BorrowMut DatafeedstatuseListCall<'a, C, A> where C: BorrowMut DatafeedstatuseCustombatchCall<'a, C, A> where C: BorrowMut ShippingsettingPatchCall<'a, C, A> where C: BorrowMut ShippingsettingGetsupportedcarrierCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/supportedCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/supportedCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8839,7 +8863,7 @@ impl<'a, C, A> ShippingsettingListCall<'a, C, A> where C: BorrowMut ShippingsettingCustombatchCall<'a, C, A> where C: BorrowMut ShippingsettingUpdateCall<'a, C, A> where C: BorrowMut ShippingsettingGetCall<'a, C, A> where C: BorrowMut DatafeedCustombatchCall<'a, C, A> where C: BorrowMut DatafeedGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds/{datafeedId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds/{datafeedId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10372,7 +10396,7 @@ impl<'a, C, A> DatafeedPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds/{datafeedId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds/{datafeedId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10652,7 +10676,7 @@ impl<'a, C, A> DatafeedDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds/{datafeedId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds/{datafeedId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10904,7 +10928,7 @@ impl<'a, C, A> DatafeedInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11179,7 +11203,7 @@ impl<'a, C, A> DatafeedListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11442,7 +11466,7 @@ impl<'a, C, A> DatafeedUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/datafeeds/{datafeedId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/datafeeds/{datafeedId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11718,7 +11742,7 @@ impl<'a, C, A> AccountstatuseGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accountstatuses/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accountstatuses/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11966,7 +11990,7 @@ impl<'a, C, A> AccountstatuseCustombatchCall<'a, C, A> where C: BorrowMut AccountstatuseListCall<'a, C, A> where C: BorrowMut AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12741,7 +12765,7 @@ impl<'a, C, A> AccountAuthinfoCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/accounts/authinfo".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/authinfo"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12959,7 +12983,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13245,7 +13269,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13500,7 +13524,7 @@ impl<'a, C, A> AccountDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13752,7 +13776,7 @@ impl<'a, C, A> AccountCustombatchCall<'a, C, A> where C: BorrowMut AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14246,7 +14270,7 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14522,7 +14546,7 @@ impl<'a, C, A> InventoryCustombatchCall<'a, C, A> where C: BorrowMut InventorySetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/inventory/{storeCode}/products/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/inventory/{storeCode}/products/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15061,7 +15085,7 @@ impl<'a, C, A> ProductstatuseGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/productstatuses/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/productstatuses/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15321,7 +15345,7 @@ impl<'a, C, A> ProductstatuseListCall<'a, C, A> where C: BorrowMut ProductstatuseCustombatchCall<'a, C, A> where C: BorrowMut ProductListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/products".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/products"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16083,7 +16107,7 @@ impl<'a, C, A> ProductGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/products/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/products/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16334,7 +16358,7 @@ impl<'a, C, A> ProductDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/products/{productId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/products/{productId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16586,7 +16610,7 @@ impl<'a, C, A> ProductCustombatchCall<'a, C, A> where C: BorrowMut ProductInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/products".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/products"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17109,7 +17133,7 @@ impl<'a, C, A> AccountshippingListCall<'a, C, A> where C: BorrowMut AccountshippingPatchCall<'a, C, A> where C: BorrowMut AccountshippingUpdateCall<'a, C, A> where C: BorrowMut AccountshippingCustombatchCall<'a, C, A> where C: BorrowMut AccountshippingGetCall<'a, C, A> where C: BorrowMut OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18756,7 +18780,7 @@ impl<'a, C, A> OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19257,7 +19281,7 @@ impl<'a, C, A> OrderRefundCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}/refund".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/refund"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19535,7 +19559,7 @@ impl<'a, C, A> OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}/acknowledge".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/acknowledge"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19813,7 +19837,7 @@ impl<'a, C, A> OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderCreatetestorderCall<'a, C, A> where C: BorrowMut OrderReturnlineitemCall<'a, C, A> where C: BorrowMut OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut OrderCustombatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/orders/batch".to_string(); + let mut url = self.hub._base_url.clone() + "orders/batch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -21362,7 +21386,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}/shipLineItems".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/shipLineItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -21640,7 +21664,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderCancelCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2/{merchantId}/orders/{orderId}/cancel".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/cancel"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -22395,4 +22419,3 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/content2_sandbox/src/lib.rs b/gen/content2_sandbox/src/lib.rs index 87f8cc8db4..1cc3b0cd09 100644 --- a/gen/content2_sandbox/src/lib.rs +++ b/gen/content2_sandbox/src/lib.rs @@ -191,7 +191,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -323,6 +323,8 @@ pub struct ShoppingContent { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for ShoppingContent {} @@ -335,6 +337,8 @@ impl<'a, C, A> ShoppingContent client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/content/v2sandbox/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -351,6 +355,26 @@ impl<'a, C, A> ShoppingContent self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/content/v2sandbox/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2234,7 +2258,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders/{orderId}".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2516,7 +2540,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2812,7 +2836,7 @@ impl<'a, C, A> OrderUpdateshipmentCall<'a, C, A> where C: BorrowMut OrderAdvancetestorderCall<'a, C, A> where C: BorrowMut OrderUpdatemerchantorderidCall<'a, C, A> where C: BorrowMut OrderReturnlineitemCall<'a, C, A> where C: BorrowMut OrderGettestordertemplateCall<'a, C, A> where C: BorrowMut OrderCreatetestorderCall<'a, C, A> where C: BorrowMut OrderRefundCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders/{orderId}/refund".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/refund"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4680,7 +4704,7 @@ impl<'a, C, A> OrderCustombatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/orders/batch".to_string(); + let mut url = self.hub._base_url.clone() + "orders/batch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4917,7 +4941,7 @@ impl<'a, C, A> OrderCancellineitemCall<'a, C, A> where C: BorrowMut OrderGetbymerchantorderidCall<'a, C, A> where C: BorrowMut OrderAcknowledgeCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders/{orderId}/acknowledge".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/acknowledge"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5720,7 +5744,7 @@ impl<'a, C, A> OrderCancelCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders/{orderId}/cancel".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/cancel"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5998,7 +6022,7 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/content/v2sandbox/{merchantId}/orders/{orderId}/shipLineItems".to_string(); + let mut url = self.hub._base_url.clone() + "{merchantId}/orders/{orderId}/shipLineItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6197,4 +6221,3 @@ impl<'a, C, A> OrderShiplineitemCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/coordinate1/src/lib.rs b/gen/coordinate1/src/lib.rs index 73c5957f84..ec2b58b0e8 100644 --- a/gen/coordinate1/src/lib.rs +++ b/gen/coordinate1/src/lib.rs @@ -200,7 +200,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -345,6 +345,8 @@ pub struct Coordinate { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Coordinate {} @@ -357,6 +359,8 @@ impl<'a, C, A> Coordinate client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/coordinate/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -388,6 +392,26 @@ impl<'a, C, A> Coordinate self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/coordinate/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1391,7 +1415,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -1697,7 +1721,7 @@ impl<'a, C, A> JobUpdateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2098,7 +2122,7 @@ impl<'a, C, A> JobPatchCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2458,7 +2482,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2763,7 +2787,7 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3127,7 +3151,7 @@ impl<'a, C, A> ScheduleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}/schedule".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}/schedule"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3453,7 +3477,7 @@ impl<'a, C, A> SchedulePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}/schedule".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}/schedule"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3752,7 +3776,7 @@ impl<'a, C, A> ScheduleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/jobs/{jobId}/schedule".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/jobs/{jobId}/schedule"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3997,7 +4021,7 @@ impl<'a, C, A> WorkerListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/workers".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/workers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4246,7 +4270,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams/{teamId}/workers/{workerEmail}/locations".to_string(); + let mut url = self.hub._base_url.clone() + "teams/{teamId}/workers/{workerEmail}/locations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4528,7 +4552,7 @@ impl<'a, C, A> TeamListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/coordinate/v1/teams".to_string(); + let mut url = self.hub._base_url.clone() + "teams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4753,7 +4777,7 @@ impl<'a, C, A> CustomFieldDefListCall<'a, C, A> where C: BorrowMut CustomFieldDefListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Customsearch {} @@ -347,6 +349,8 @@ impl<'a, C, A> Customsearch client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/customsearch/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -363,6 +367,26 @@ impl<'a, C, A> Customsearch self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/customsearch/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1089,7 +1113,7 @@ impl<'a, C, A> CseListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/customsearch/v1".to_string(); + let mut url = self.hub._base_url.clone() + "v1"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1429,4 +1453,3 @@ impl<'a, C, A> CseListCall<'a, C, A> where C: BorrowMut, A: oauth } - diff --git a/gen/dataproc1/src/lib.rs b/gen/dataproc1/src/lib.rs index 2369ba4edc..10a20f83b8 100644 --- a/gen/dataproc1/src/lib.rs +++ b/gen/dataproc1/src/lib.rs @@ -181,7 +181,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -313,6 +313,8 @@ pub struct Dataproc { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dataproc {} @@ -325,6 +327,8 @@ impl<'a, C, A> Dataproc client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://dataproc.googleapis.com/".to_string(), + _root_url: "https://dataproc.googleapis.com/".to_string(), } } @@ -341,6 +345,26 @@ impl<'a, C, A> Dataproc self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://dataproc.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://dataproc.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1537,7 +1561,7 @@ impl<'a, C, A> ProjectRegionClusterGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterListCall<'a, C, A> where C: BorrowMut ProjectRegionJobListCall<'a, C, A> where C: BorrowMut ProjectRegionClusterPatchCall<'a, C, A> where C: BorrowMut ProjectRegionJobGetCall<'a, C, A> where C: BorrowMut ProjectRegionOperationCancelCall<'a, C, A> where C: BorrowMut ProjectRegionOperationGetCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionClusterDiagnoseCall<'a, C, A> where C: BorrowMut ProjectRegionJobSubmitCall<'a, C, A> where C: BorrowMut ProjectRegionClusterCreateCall<'a, C, A> where C: BorrowMut ProjectRegionJobDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationDeleteCall<'a, C, A> where C: BorrowMut ProjectRegionOperationListCall<'a, C, A> where C: BorrowMut ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut ProjectRegionJobCancelCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for DeploymentManager {} @@ -355,6 +357,8 @@ impl<'a, C, A> DeploymentManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/deploymentmanager/v2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -383,6 +387,26 @@ impl<'a, C, A> DeploymentManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/deploymentmanager/v2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1978,7 +2002,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2243,7 +2267,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2540,7 +2564,7 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/manifests".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/manifests"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2829,7 +2853,7 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/manifests/{manifest}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/manifests/{manifest}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3104,7 +3128,7 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/types".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/types"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3383,7 +3407,7 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/resources/{resource}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/resources/{resource}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3660,7 +3684,7 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/resources".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/resources"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3969,7 +3993,7 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4261,7 +4285,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -4518,7 +4542,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4793,7 +4817,7 @@ impl<'a, C, A> DeploymentTestIamPermissionCall<'a, C, A> where C: BorrowMut DeploymentGetIamPolicyCall<'a, C, A> where C: BorrowMut DeploymentCancelPreviewCall<'a, C, A> where C: BorrowMut DeploymentListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -5906,7 +5930,7 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6205,7 +6229,7 @@ impl<'a, C, A> DeploymentStopCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}/stop".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6483,7 +6507,7 @@ impl<'a, C, A> DeploymentSetIamPolicyCall<'a, C, A> where C: BorrowMut DeploymentDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6941,4 +6965,3 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/deploymentmanager2_beta2/src/lib.rs b/gen/deploymentmanager2_beta2/src/lib.rs index 6384fd6a7a..543d6990a9 100644 --- a/gen/deploymentmanager2_beta2/src/lib.rs +++ b/gen/deploymentmanager2_beta2/src/lib.rs @@ -192,7 +192,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -338,6 +338,8 @@ pub struct DeploymentManager { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for DeploymentManager {} @@ -350,6 +352,8 @@ impl<'a, C, A> DeploymentManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/deploymentmanager/v2beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -378,6 +382,26 @@ impl<'a, C, A> DeploymentManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/deploymentmanager/v2beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1422,7 +1446,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -1682,7 +1706,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -1963,7 +1987,7 @@ impl<'a, C, A> ManifestListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}/manifests".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/manifests"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2241,7 +2265,7 @@ impl<'a, C, A> ManifestGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}/manifests/{manifest}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/manifests/{manifest}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2500,7 +2524,7 @@ impl<'a, C, A> ResourceGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}/resources/{resource}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/resources/{resource}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2772,7 +2796,7 @@ impl<'a, C, A> ResourceListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}/resources".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}/resources"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3061,7 +3085,7 @@ impl<'a, C, A> TypeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/types".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/types"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3349,7 +3373,7 @@ impl<'a, C, A> DeploymentUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3641,7 +3665,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3893,7 +3917,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4167,7 +4191,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -4455,7 +4479,7 @@ impl<'a, C, A> DeploymentPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4747,7 +4771,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/deploymentmanager/v2beta2/projects/{project}/global/deployments/{deployment}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/deployments/{deployment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4922,4 +4946,3 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/dfareporting2d1/src/lib.rs b/gen/dfareporting2d1/src/lib.rs index 74e3dcfebe..6cad9819cf 100644 --- a/gen/dfareporting2d1/src/lib.rs +++ b/gen/dfareporting2d1/src/lib.rs @@ -301,7 +301,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -435,6 +435,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -447,6 +449,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -625,6 +629,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -13233,7 +13257,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -13960,7 +13984,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14206,7 +14230,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16462,7 +16486,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16951,7 +16975,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17756,7 +17780,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18008,7 +18032,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18268,7 +18292,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18512,7 +18536,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18823,7 +18847,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19117,7 +19141,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19865,7 +19889,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20136,7 +20160,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20390,7 +20414,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20670,7 +20694,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20952,7 +20976,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21210,9 +21234,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21884,7 +21908,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22206,7 +22230,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22516,7 +22540,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22763,7 +22787,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23820,7 +23844,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24111,7 +24135,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24391,7 +24415,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24659,7 +24683,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24935,7 +24959,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25466,7 +25490,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25722,7 +25746,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25982,7 +26006,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26259,7 +26283,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26527,7 +26551,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26862,7 +26886,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27191,7 +27215,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27452,7 +27476,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27714,7 +27738,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29902,7 +29926,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30202,7 +30226,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30459,7 +30483,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31231,7 +31255,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31475,7 +31499,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31751,7 +31775,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32150,7 +32174,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32565,7 +32589,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32817,7 +32841,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33078,7 +33102,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -34042,7 +34066,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -35911,7 +35935,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36237,7 +36261,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36587,7 +36611,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36855,7 +36879,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37126,7 +37150,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39303,7 +39327,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39816,7 +39840,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40421,7 +40445,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41541,7 +41565,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41832,7 +41856,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42117,7 +42141,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42378,7 +42402,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42625,7 +42649,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42870,7 +42894,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43107,7 +43131,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -44946,7 +44970,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45282,7 +45306,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46418,7 +46442,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47043,7 +47067,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47300,7 +47324,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50153,7 +50177,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50414,7 +50438,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50751,7 +50775,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51113,7 +51137,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51384,7 +51408,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51640,7 +51664,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51928,7 +51952,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52204,7 +52228,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52536,7 +52560,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52867,7 +52891,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53156,7 +53180,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53470,7 +53494,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53738,7 +53762,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54014,7 +54038,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54275,7 +54299,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54522,7 +54546,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56207,7 +56231,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58130,7 +58154,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58382,7 +58406,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59037,7 +59061,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59289,7 +59313,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59570,7 +59594,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59836,7 +59860,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60083,7 +60107,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61968,7 +61992,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62217,7 +62241,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62525,7 +62549,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62838,7 +62862,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63083,7 +63107,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63318,7 +63342,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63555,7 +63579,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63837,7 +63861,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64129,7 +64153,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64397,7 +64421,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64675,7 +64699,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65056,7 +65080,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65435,7 +65459,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65701,7 +65725,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65979,7 +66003,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.1/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66414,4 +66438,3 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/dfareporting2d2/src/lib.rs b/gen/dfareporting2d2/src/lib.rs index daf8551a59..7709565490 100644 --- a/gen/dfareporting2d2/src/lib.rs +++ b/gen/dfareporting2d2/src/lib.rs @@ -301,7 +301,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -435,6 +435,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -447,6 +449,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -625,6 +629,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -13253,7 +13277,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -13980,7 +14004,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14226,7 +14250,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16482,7 +16506,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16971,7 +16995,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17776,7 +17800,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18028,7 +18052,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18288,7 +18312,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18532,7 +18556,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18843,7 +18867,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19137,7 +19161,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19885,7 +19909,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20156,7 +20180,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20410,7 +20434,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20690,7 +20714,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20972,7 +20996,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21230,9 +21254,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21904,7 +21928,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22226,7 +22250,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22536,7 +22560,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22783,7 +22807,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23840,7 +23864,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24131,7 +24155,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24411,7 +24435,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24679,7 +24703,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24955,7 +24979,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25486,7 +25510,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25742,7 +25766,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26002,7 +26026,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26279,7 +26303,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26547,7 +26571,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26882,7 +26906,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27211,7 +27235,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27472,7 +27496,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27734,7 +27758,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29922,7 +29946,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30222,7 +30246,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30479,7 +30503,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31251,7 +31275,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31495,7 +31519,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31771,7 +31795,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32170,7 +32194,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32585,7 +32609,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32837,7 +32861,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33098,7 +33122,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -34062,7 +34086,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -35931,7 +35955,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36257,7 +36281,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36607,7 +36631,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36875,7 +36899,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37146,7 +37170,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39323,7 +39347,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39836,7 +39860,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40441,7 +40465,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41561,7 +41585,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41852,7 +41876,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42137,7 +42161,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42398,7 +42422,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42645,7 +42669,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42890,7 +42914,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43127,7 +43151,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -44966,7 +44990,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45322,7 +45346,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46486,7 +46510,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47111,7 +47135,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47368,7 +47392,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50221,7 +50245,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50482,7 +50506,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50819,7 +50843,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51181,7 +51205,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51452,7 +51476,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51708,7 +51732,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51996,7 +52020,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52272,7 +52296,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52604,7 +52628,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52935,7 +52959,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53224,7 +53248,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53538,7 +53562,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53806,7 +53830,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54082,7 +54106,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54343,7 +54367,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54590,7 +54614,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56275,7 +56299,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58198,7 +58222,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58450,7 +58474,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59105,7 +59129,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59357,7 +59381,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59638,7 +59662,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59904,7 +59928,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60151,7 +60175,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62036,7 +62060,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62285,7 +62309,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62593,7 +62617,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62906,7 +62930,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63151,7 +63175,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63386,7 +63410,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63623,7 +63647,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63905,7 +63929,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64197,7 +64221,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64465,7 +64489,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64743,7 +64767,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65144,7 +65168,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65551,7 +65575,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65817,7 +65841,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66095,7 +66119,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.2/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66530,4 +66554,3 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/dfareporting2d3/src/lib.rs b/gen/dfareporting2d3/src/lib.rs index 650d35113b..ce90ae0fa5 100644 --- a/gen/dfareporting2d3/src/lib.rs +++ b/gen/dfareporting2d3/src/lib.rs @@ -301,7 +301,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -435,6 +435,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -447,6 +449,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -625,6 +629,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -13239,7 +13263,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -13966,7 +13990,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14212,7 +14236,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16468,7 +16492,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16957,7 +16981,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17762,7 +17786,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18014,7 +18038,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18274,7 +18298,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18518,7 +18542,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18829,7 +18853,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19123,7 +19147,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19871,7 +19895,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20142,7 +20166,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20396,7 +20420,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20676,7 +20700,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20958,7 +20982,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21216,9 +21240,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21890,7 +21914,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22212,7 +22236,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22522,7 +22546,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22769,7 +22793,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23826,7 +23850,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24117,7 +24141,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24397,7 +24421,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24665,7 +24689,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24941,7 +24965,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25472,7 +25496,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25728,7 +25752,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25988,7 +26012,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26265,7 +26289,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26533,7 +26557,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26868,7 +26892,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27197,7 +27221,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27458,7 +27482,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27720,7 +27744,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29672,7 +29696,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29972,7 +29996,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30229,7 +30253,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31001,7 +31025,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31245,7 +31269,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31521,7 +31545,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31920,7 +31944,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32335,7 +32359,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32587,7 +32611,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32848,7 +32872,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33812,7 +33836,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -35681,7 +35705,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36007,7 +36031,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36357,7 +36381,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36625,7 +36649,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36896,7 +36920,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39073,7 +39097,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39586,7 +39610,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40191,7 +40215,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41311,7 +41335,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41602,7 +41626,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41887,7 +41911,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42148,7 +42172,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42395,7 +42419,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42640,7 +42664,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42877,7 +42901,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -44716,7 +44740,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45072,7 +45096,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46236,7 +46260,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46861,7 +46885,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47118,7 +47142,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -49971,7 +49995,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50232,7 +50256,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50569,7 +50593,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50931,7 +50955,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51202,7 +51226,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51458,7 +51482,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51746,7 +51770,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52022,7 +52046,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52354,7 +52378,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52685,7 +52709,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52974,7 +52998,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53288,7 +53312,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53556,7 +53580,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53832,7 +53856,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54093,7 +54117,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54340,7 +54364,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56025,7 +56049,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -57948,7 +57972,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58200,7 +58224,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58855,7 +58879,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59107,7 +59131,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59388,7 +59412,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59654,7 +59678,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59901,7 +59925,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61786,7 +61810,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62035,7 +62059,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62343,7 +62367,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62656,7 +62680,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62901,7 +62925,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63136,7 +63160,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63373,7 +63397,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63655,7 +63679,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63947,7 +63971,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64215,7 +64239,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64493,7 +64517,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64894,7 +64918,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65301,7 +65325,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65567,7 +65591,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65845,7 +65869,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.3/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66280,4 +66304,3 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/dfareporting2d4/src/lib.rs b/gen/dfareporting2d4/src/lib.rs index 3162e59831..b6a475e4e0 100644 --- a/gen/dfareporting2d4/src/lib.rs +++ b/gen/dfareporting2d4/src/lib.rs @@ -301,7 +301,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -435,6 +435,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -447,6 +449,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.4/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -625,6 +629,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.4/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -13243,7 +13267,7 @@ impl<'a, C, A> UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -13970,7 +13994,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14216,7 +14240,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16472,7 +16496,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16961,7 +16985,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17766,7 +17790,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18018,7 +18042,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18278,7 +18302,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18522,7 +18546,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18833,7 +18857,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19127,7 +19151,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19875,7 +19899,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20146,7 +20170,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20400,7 +20424,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20680,7 +20704,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20962,7 +20986,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21220,9 +21244,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21894,7 +21918,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22216,7 +22240,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22526,7 +22550,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22773,7 +22797,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23830,7 +23854,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24121,7 +24145,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24401,7 +24425,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24669,7 +24693,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24945,7 +24969,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25476,7 +25500,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25732,7 +25756,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25992,7 +26016,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26269,7 +26293,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26537,7 +26561,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26872,7 +26896,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27201,7 +27225,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27462,7 +27486,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27724,7 +27748,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29676,7 +29700,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29976,7 +30000,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30233,7 +30257,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31005,7 +31029,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31249,7 +31273,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31525,7 +31549,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31924,7 +31948,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32339,7 +32363,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32591,7 +32615,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32852,7 +32876,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33816,7 +33840,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -35685,7 +35709,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36011,7 +36035,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36361,7 +36385,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36629,7 +36653,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36900,7 +36924,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39077,7 +39101,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39590,7 +39614,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40195,7 +40219,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41315,7 +41339,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41606,7 +41630,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41891,7 +41915,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42152,7 +42176,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42399,7 +42423,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42644,7 +42668,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42881,7 +42905,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -44720,7 +44744,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45076,7 +45100,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46240,7 +46264,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46877,7 +46901,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47134,7 +47158,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -49987,7 +50011,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50248,7 +50272,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50585,7 +50609,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50947,7 +50971,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51218,7 +51242,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51474,7 +51498,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51762,7 +51786,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52038,7 +52062,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52370,7 +52394,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52701,7 +52725,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52990,7 +53014,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53304,7 +53328,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53572,7 +53596,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53848,7 +53872,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54109,7 +54133,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54356,7 +54380,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56041,7 +56065,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -57964,7 +57988,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58216,7 +58240,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58871,7 +58895,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59123,7 +59147,7 @@ impl<'a, C, A> SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59404,7 +59428,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59670,7 +59694,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59917,7 +59941,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61802,7 +61826,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62051,7 +62075,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62359,7 +62383,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62672,7 +62696,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62917,7 +62941,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63152,7 +63176,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63389,7 +63413,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63671,7 +63695,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63963,7 +63987,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64231,7 +64255,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64509,7 +64533,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64910,7 +64934,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65317,7 +65341,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65583,7 +65607,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65861,7 +65885,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.4/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66296,4 +66320,3 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/dfareporting2d5/src/lib.rs b/gen/dfareporting2d5/src/lib.rs index b5f6702a92..54baa23640 100644 --- a/gen/dfareporting2d5/src/lib.rs +++ b/gen/dfareporting2d5/src/lib.rs @@ -305,7 +305,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -443,6 +443,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -455,6 +457,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.5/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -639,6 +643,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.5/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -13645,7 +13669,7 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14633,7 +14657,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -14879,7 +14903,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17135,7 +17159,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17624,7 +17648,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18429,7 +18453,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18681,7 +18705,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18941,7 +18965,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19185,7 +19209,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19496,7 +19520,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19790,7 +19814,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20538,7 +20562,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20809,7 +20833,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21063,7 +21087,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21343,7 +21367,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21625,7 +21649,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21883,9 +21907,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22557,7 +22581,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22879,7 +22903,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -23189,7 +23213,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -23436,7 +23460,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24493,7 +24517,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24784,7 +24808,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25064,7 +25088,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25332,7 +25356,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25608,7 +25632,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26139,7 +26163,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26395,7 +26419,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26655,7 +26679,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26932,7 +26956,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27200,7 +27224,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27535,7 +27559,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27864,7 +27888,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -28125,7 +28149,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -28387,7 +28411,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30339,7 +30363,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30639,7 +30663,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30896,7 +30920,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31668,7 +31692,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31912,7 +31936,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32188,7 +32212,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32587,7 +32611,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33002,7 +33026,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33254,7 +33278,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33515,7 +33539,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -34479,7 +34503,7 @@ impl<'a, C, A> AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36348,7 +36372,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36674,7 +36698,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37024,7 +37048,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37292,7 +37316,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37563,7 +37587,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39740,7 +39764,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40253,7 +40277,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40858,7 +40882,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41978,7 +42002,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42244,7 +42268,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42535,7 +42559,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42815,7 +42839,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43062,7 +43086,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43307,7 +43331,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43544,7 +43568,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45383,7 +45407,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -45739,7 +45763,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -46903,7 +46927,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47540,7 +47564,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47797,7 +47821,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50650,7 +50674,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -50911,7 +50935,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51248,7 +51272,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51610,7 +51634,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51881,7 +51905,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52137,7 +52161,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52425,7 +52449,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52701,7 +52725,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53033,7 +53057,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53364,7 +53388,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53653,7 +53677,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53967,7 +53991,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54235,7 +54259,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54511,7 +54535,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54772,7 +54796,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55019,7 +55043,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56704,7 +56728,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58627,7 +58651,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -58879,7 +58903,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59534,7 +59558,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59784,7 +59808,7 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60879,7 +60903,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61145,7 +61169,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61392,7 +61416,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63277,7 +63301,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63526,7 +63550,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63834,7 +63858,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64147,7 +64171,7 @@ impl<'a, C, A> PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64392,7 +64416,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64627,7 +64651,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64864,7 +64888,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65146,7 +65170,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65438,7 +65462,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65706,7 +65730,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65984,7 +66008,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66385,7 +66409,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66792,7 +66816,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67058,7 +67082,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67336,7 +67360,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.5/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67771,4 +67795,3 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/dfareporting2d6/src/lib.rs b/gen/dfareporting2d6/src/lib.rs index 38f51eac21..fe2e229dc5 100644 --- a/gen/dfareporting2d6/src/lib.rs +++ b/gen/dfareporting2d6/src/lib.rs @@ -309,7 +309,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -447,6 +447,8 @@ pub struct Dfareporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -459,6 +461,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.6/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -649,6 +653,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.6/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -14058,7 +14082,7 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15046,7 +15070,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15285,7 +15309,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15593,7 +15617,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15911,7 +15935,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16496,7 +16520,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16985,7 +17009,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17790,7 +17814,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18042,7 +18066,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18302,7 +18326,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18546,7 +18570,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18857,7 +18881,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19151,7 +19175,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19899,7 +19923,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20170,7 +20194,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20424,7 +20448,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20704,7 +20728,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20986,7 +21010,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21244,9 +21268,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21918,7 +21942,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22240,7 +22264,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22550,7 +22574,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22797,7 +22821,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -23854,7 +23878,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24145,7 +24169,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24425,7 +24449,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24693,7 +24717,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24969,7 +24993,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25500,7 +25524,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25756,7 +25780,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26016,7 +26040,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26293,7 +26317,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26561,7 +26585,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26896,7 +26920,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27225,7 +27249,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27486,7 +27510,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27748,7 +27772,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29700,7 +29724,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30000,7 +30024,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30255,7 +30279,7 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/languages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/languages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30492,7 +30516,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31264,7 +31288,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31508,7 +31532,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -31784,7 +31808,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32183,7 +32207,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32598,7 +32622,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32850,7 +32874,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33111,7 +33135,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -34105,7 +34129,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36510,7 +36534,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36836,7 +36860,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37186,7 +37210,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37454,7 +37478,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37725,7 +37749,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -39902,7 +39926,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40415,7 +40439,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41020,7 +41044,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetingTemplatePatchCall<'a, C, A> where C: BorrowMut TargetingTemplateListCall<'a, C, A> where C: BorrowMut TargetingTemplateGetCall<'a, C, A> where C: BorrowMut TargetingTemplateInsertCall<'a, C, A> where C: BorrowMut TargetingTemplateUpdateCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -42953,7 +42977,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43219,7 +43243,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43510,7 +43534,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43790,7 +43814,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44037,7 +44061,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44282,7 +44306,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44519,7 +44543,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -46358,7 +46382,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -46714,7 +46738,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -47878,7 +47902,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -48515,7 +48539,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -48772,7 +48796,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51625,7 +51649,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51886,7 +51910,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52223,7 +52247,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52585,7 +52609,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52856,7 +52880,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53112,7 +53136,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53400,7 +53424,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53676,7 +53700,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54008,7 +54032,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54339,7 +54363,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54628,7 +54652,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54942,7 +54966,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55210,7 +55234,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55486,7 +55510,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55747,7 +55771,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55994,7 +56018,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -57679,7 +57703,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59602,7 +59626,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59854,7 +59878,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60509,7 +60533,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60759,7 +60783,7 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61854,7 +61878,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62120,7 +62144,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62367,7 +62391,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64252,7 +64276,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64508,7 +64532,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66419,7 +66443,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66654,7 +66678,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -66891,7 +66915,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67173,7 +67197,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67465,7 +67489,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67733,7 +67757,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68011,7 +68035,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68412,7 +68436,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68814,7 +68838,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69066,7 +69090,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69332,7 +69356,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.6/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69610,7 +69634,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGeneratetagCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dfareporting {} @@ -461,6 +463,8 @@ impl<'a, C, A> Dfareporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dfareporting/v2.7/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -654,6 +658,26 @@ impl<'a, C, A> Dfareporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dfareporting/v2.7/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -14306,7 +14330,7 @@ impl<'a, C, A> ConversionBatchinsertCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupGetCall<'a, C, A> where C: BorrowMut UserRolePermissionGroupListCall<'a, C, A> where C: BorrowMut PlatformTypeGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/platformTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15294,7 +15318,7 @@ impl<'a, C, A> PlatformTypeListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/platformTypes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/platformTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15533,7 +15557,7 @@ impl<'a, C, A> OrderDocumentGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -15841,7 +15865,7 @@ impl<'a, C, A> OrderDocumentListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/orderDocuments".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orderDocuments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16159,7 +16183,7 @@ impl<'a, C, A> CreativeFieldUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creativeFields".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -16744,7 +16768,7 @@ impl<'a, C, A> CreativeFieldDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creativeFields/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeFields/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -17233,7 +17257,7 @@ impl<'a, C, A> CreativeFieldInsertCall<'a, C, A> where C: BorrowMut CreativeFieldPatchCall<'a, C, A> where C: BorrowMut UserRoleInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18038,7 +18062,7 @@ impl<'a, C, A> UserRoleGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18290,7 +18314,7 @@ impl<'a, C, A> UserRoleUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18550,7 +18574,7 @@ impl<'a, C, A> UserRoleDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -18794,7 +18818,7 @@ impl<'a, C, A> UserRolePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19105,7 +19129,7 @@ impl<'a, C, A> UserRoleListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/userRoles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/userRoles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -19399,7 +19423,7 @@ impl<'a, C, A> OperatingSystemVersionGetCall<'a, C, A> where C: BorrowMut OperatingSystemVersionListCall<'a, C, A> where C: BorrowMut LandingPageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20147,7 +20171,7 @@ impl<'a, C, A> LandingPageUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20418,7 +20442,7 @@ impl<'a, C, A> LandingPageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20672,7 +20696,7 @@ impl<'a, C, A> LandingPageInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -20952,7 +20976,7 @@ impl<'a, C, A> LandingPagePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21234,7 +21258,7 @@ impl<'a, C, A> LandingPageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -21492,9 +21516,9 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut CampaignCreativeAssociationInsertCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22166,7 +22190,7 @@ impl<'a, C, A> CampaignCreativeAssociationListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22488,7 +22512,7 @@ impl<'a, C, A> ChangeLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/changeLogs".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -22798,7 +22822,7 @@ impl<'a, C, A> ChangeLogGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/changeLogs/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/changeLogs/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -23045,7 +23069,7 @@ impl<'a, C, A> RemarketingListShareGetCall<'a, C, A> where C: BorrowMut RemarketingListSharePatchCall<'a, C, A> where C: BorrowMut RemarketingListShareUpdateCall<'a, C, A> where C: BorrowMut ReportRunCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}/run".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/run"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24102,7 +24126,7 @@ impl<'a, C, A> ReportPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24393,7 +24417,7 @@ impl<'a, C, A> ReportFileListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24673,7 +24697,7 @@ impl<'a, C, A> ReportInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24939,7 +24963,7 @@ impl<'a, C, A> ReportCompatibleFieldQueryCall<'a, C, A> where C: BorrowMut ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25470,7 +25494,7 @@ impl<'a, C, A> ReportFileGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25726,7 +25750,7 @@ impl<'a, C, A> ReportDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25970,7 +25994,7 @@ impl<'a, C, A> ReportUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26264,7 +26288,7 @@ impl<'a, C, A> ReportListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -26541,7 +26565,7 @@ impl<'a, C, A> AdvertiserInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -26809,7 +26833,7 @@ impl<'a, C, A> AdvertiserPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27144,7 +27168,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27473,7 +27497,7 @@ impl<'a, C, A> AdvertiserUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27734,7 +27758,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/advertisers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/advertisers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -27996,7 +28020,7 @@ impl<'a, C, A> DimensionValueQueryCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupGetCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupListCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityGroupUpdateCall<'a, C, A> where C: BorrowMut MetroListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/metros".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/metros"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -29948,7 +29972,7 @@ impl<'a, C, A> OrderListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30248,7 +30272,7 @@ impl<'a, C, A> OrderGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/orders/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/orders/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30503,7 +30527,7 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/languages".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/languages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -30740,7 +30764,7 @@ impl<'a, C, A> DirectorySiteContactGetCall<'a, C, A> where C: BorrowMut DirectorySiteContactListCall<'a, C, A> where C: BorrowMut UserProfileListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31512,7 +31536,7 @@ impl<'a, C, A> UserProfileGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -31756,7 +31780,7 @@ impl<'a, C, A> AdPatchCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32032,7 +32056,7 @@ impl<'a, C, A> AdInsertCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32426,7 +32450,7 @@ impl<'a, C, A> AdListCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -32834,7 +32858,7 @@ impl<'a, C, A> AdGetCall<'a, C, A> where C: BorrowMut, A: oauth2: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/ads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33086,7 +33110,7 @@ impl<'a, C, A> AdUpdateCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/ads".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/ads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -33347,7 +33371,7 @@ impl<'a, C, A> AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut ConnectionTypeListCall<'a, C, A> where C: BorrowMut ConnectionTypeGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/connectionTypes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/connectionTypes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -34341,7 +34365,7 @@ impl<'a, C, A> TargetableRemarketingListListCall<'a, C, A> where C: BorrowMut TargetableRemarketingListGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupGetCall<'a, C, A> where C: BorrowMut AdvertiserGroupListCall<'a, C, A> where C: BorrowMut AdvertiserGroupInsertCall<'a, C, A> where C: BorrowMut AdvertiserGroupUpdateCall<'a, C, A> where C: BorrowMut AdvertiserGroupPatchCall<'a, C, A> where C: BorrowMut AdvertiserGroupDeleteCall<'a, C, A> where C: BorrowMut SiteInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -36746,7 +36770,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37072,7 +37096,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37422,7 +37446,7 @@ impl<'a, C, A> SiteUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37690,7 +37714,7 @@ impl<'a, C, A> SitePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -37961,7 +37985,7 @@ impl<'a, C, A> FloodlightActivityGetCall<'a, C, A> where C: BorrowMut FloodlightActivityListCall<'a, C, A> where C: BorrowMut FloodlightActivityInsertCall<'a, C, A> where C: BorrowMut FloodlightActivityDeleteCall<'a, C, A> where C: BorrowMut FloodlightActivityPatchCall<'a, C, A> where C: BorrowMut FloodlightActivityGeneratetagCall<'a, C, A> where C: BorrowMut FloodlightActivityUpdateCall<'a, C, A> where C: BorrowMut RegionListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/regions".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/regions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40138,7 +40162,7 @@ impl<'a, C, A> CreativeGroupInsertCall<'a, C, A> where C: BorrowMut CreativeGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creativeGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -40651,7 +40675,7 @@ impl<'a, C, A> CreativeGroupUpdateCall<'a, C, A> where C: BorrowMut CreativeGroupListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creativeGroups".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creativeGroups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -41256,7 +41280,7 @@ impl<'a, C, A> CreativeGroupPatchCall<'a, C, A> where C: BorrowMut TargetingTemplatePatchCall<'a, C, A> where C: BorrowMut TargetingTemplateListCall<'a, C, A> where C: BorrowMut TargetingTemplateGetCall<'a, C, A> where C: BorrowMut TargetingTemplateInsertCall<'a, C, A> where C: BorrowMut TargetingTemplateUpdateCall<'a, C, A> where C: BorrowMut SubaccountPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43189,7 +43213,7 @@ impl<'a, C, A> SubaccountInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43455,7 +43479,7 @@ impl<'a, C, A> SubaccountUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -43746,7 +43770,7 @@ impl<'a, C, A> SubaccountListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/subaccounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44026,7 +44050,7 @@ impl<'a, C, A> SubaccountGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/subaccounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/subaccounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44273,7 +44297,7 @@ impl<'a, C, A> MobileCarrierGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/mobileCarriers/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44518,7 +44542,7 @@ impl<'a, C, A> MobileCarrierListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/mobileCarriers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/mobileCarriers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -44755,7 +44779,7 @@ impl<'a, C, A> FloodlightConfigurationGetCall<'a, C, A> where C: BorrowMut FloodlightConfigurationUpdateCall<'a, C, A> where C: BorrowMut FloodlightConfigurationPatchCall<'a, C, A> where C: BorrowMut FloodlightConfigurationListCall<'a, C, A> where C: BorrowMut OperatingSystemListCall<'a, C, A> where C: BorrowMut OperatingSystemGetCall<'a, C, A> where C: BorrowMut FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/files".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -46594,7 +46618,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/reports/{reportId}/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -46950,7 +46974,7 @@ impl<'a, C, A> PlacementGroupListCall<'a, C, A> where C: BorrowMut PlacementGroupUpdateCall<'a, C, A> where C: BorrowMut PlacementGroupInsertCall<'a, C, A> where C: BorrowMut PlacementGroupGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placementGroups/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placementGroups/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -48114,7 +48138,7 @@ impl<'a, C, A> PlacementGroupPatchCall<'a, C, A> where C: BorrowMut InventoryItemListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/inventoryItems".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -48751,7 +48775,7 @@ impl<'a, C, A> InventoryItemGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -49008,7 +49032,7 @@ impl<'a, C, A> UserRolePermissionGetCall<'a, C, A> where C: BorrowMut UserRolePermissionListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupListCall<'a, C, A> where C: BorrowMut AccountPermissionGroupGetCall<'a, C, A> where C: BorrowMut ContentCategoryListCall<'a, C, A> where C: BorrowMut ContentCategoryUpdateCall<'a, C, A> where C: BorrowMut ContentCategoryInsertCall<'a, C, A> where C: BorrowMut ContentCategoryDeleteCall<'a, C, A> where C: BorrowMut ContentCategoryGetCall<'a, C, A> where C: BorrowMut ContentCategoryPatchCall<'a, C, A> where C: BorrowMut CreativeUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -51861,7 +51885,7 @@ impl<'a, C, A> CreativeInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52122,7 +52146,7 @@ impl<'a, C, A> CreativeGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creatives/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52459,7 +52483,7 @@ impl<'a, C, A> CreativeListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -52821,7 +52845,7 @@ impl<'a, C, A> CreativePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/creatives".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/creatives"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53092,7 +53116,7 @@ impl<'a, C, A> CampaignGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53348,7 +53372,7 @@ impl<'a, C, A> CampaignInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53636,7 +53660,7 @@ impl<'a, C, A> CampaignPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -53912,7 +53936,7 @@ impl<'a, C, A> CampaignUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54244,7 +54268,7 @@ impl<'a, C, A> CampaignListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/campaigns".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/campaigns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54575,7 +54599,7 @@ impl<'a, C, A> EventTagDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -54864,7 +54888,7 @@ impl<'a, C, A> EventTagListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55178,7 +55202,7 @@ impl<'a, C, A> EventTagInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55446,7 +55470,7 @@ impl<'a, C, A> EventTagPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55722,7 +55746,7 @@ impl<'a, C, A> EventTagUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -55983,7 +56007,7 @@ impl<'a, C, A> EventTagGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/eventTags/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/eventTags/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -56230,7 +56254,7 @@ impl<'a, C, A> RemarketingListGetCall<'a, C, A> where C: BorrowMut RemarketingListUpdateCall<'a, C, A> where C: BorrowMut RemarketingListListCall<'a, C, A> where C: BorrowMut RemarketingListPatchCall<'a, C, A> where C: BorrowMut RemarketingListInsertCall<'a, C, A> where C: BorrowMut CityListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/cities".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/cities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -57915,7 +57939,7 @@ impl<'a, C, A> PlacementStrategyUpdateCall<'a, C, A> where C: BorrowMut PlacementStrategyGetCall<'a, C, A> where C: BorrowMut PlacementStrategyListCall<'a, C, A> where C: BorrowMut PlacementStrategyDeleteCall<'a, C, A> where C: BorrowMut PlacementStrategyInsertCall<'a, C, A> where C: BorrowMut PlacementStrategyPatchCall<'a, C, A> where C: BorrowMut ProjectListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -59838,7 +59862,7 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/projects/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/projects/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60090,7 +60114,7 @@ impl<'a, C, A> DirectorySiteInsertCall<'a, C, A> where C: BorrowMut DirectorySiteListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/directorySites".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60745,7 +60769,7 @@ impl<'a, C, A> DirectorySiteGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/directorySites/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/directorySites/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -60992,7 +61016,7 @@ impl<'a, C, A> VideoFormatGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/videoFormats/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/videoFormats/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61237,7 +61261,7 @@ impl<'a, C, A> VideoFormatListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/videoFormats".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/videoFormats"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -61477,7 +61501,7 @@ impl<'a, C, A> DynamicTargetingKeyDeleteCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyListCall<'a, C, A> where C: BorrowMut DynamicTargetingKeyInsertCall<'a, C, A> where C: BorrowMut SizeInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62572,7 +62596,7 @@ impl<'a, C, A> SizeListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sizes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -62838,7 +62862,7 @@ impl<'a, C, A> SizeGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/sizes/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/sizes/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -63085,7 +63109,7 @@ impl<'a, C, A> AccountActiveAdSummaryGetCall<'a, C, A> where C: BorrowMut AccountUserProfileUpdateCall<'a, C, A> where C: BorrowMut AccountUserProfileListCall<'a, C, A> where C: BorrowMut AccountUserProfileInsertCall<'a, C, A> where C: BorrowMut AccountUserProfilePatchCall<'a, C, A> where C: BorrowMut AccountUserProfileGetCall<'a, C, A> where C: BorrowMut CountryListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/countries".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -64970,7 +64994,7 @@ impl<'a, C, A> CountryGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/countries/{dartId}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/countries/{dartId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -65226,7 +65250,7 @@ impl<'a, C, A> CreativeFieldValuePatchCall<'a, C, A> where C: BorrowMut CreativeFieldValueGetCall<'a, C, A> where C: BorrowMut CreativeFieldValueDeleteCall<'a, C, A> where C: BorrowMut CreativeFieldValueInsertCall<'a, C, A> where C: BorrowMut CreativeFieldValueUpdateCall<'a, C, A> where C: BorrowMut CreativeFieldValueListCall<'a, C, A> where C: BorrowMut PostalCodeGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/postalCodes/{code}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes/{code}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67137,7 +67161,7 @@ impl<'a, C, A> PostalCodeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/postalCodes".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/postalCodes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67372,7 +67396,7 @@ impl<'a, C, A> BrowserListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/browsers".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/browsers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67609,7 +67633,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/accounts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -67891,7 +67915,7 @@ impl<'a, C, A> AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68183,7 +68207,7 @@ impl<'a, C, A> AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68451,7 +68475,7 @@ impl<'a, C, A> AccountPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -68729,7 +68753,7 @@ impl<'a, C, A> PlacementPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69130,7 +69154,7 @@ impl<'a, C, A> PlacementListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69532,7 +69556,7 @@ impl<'a, C, A> PlacementGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placements/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -69784,7 +69808,7 @@ impl<'a, C, A> PlacementInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -70050,7 +70074,7 @@ impl<'a, C, A> PlacementUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dfareporting/v2.7/userprofiles/{profileId}/placements".to_string(); + let mut url = self.hub._base_url.clone() + "userprofiles/{profileId}/placements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Dfatrafficking.as_ref().to_string(), ()); } @@ -70328,7 +70352,7 @@ impl<'a, C, A> PlacementGeneratetagCall<'a, C, A> where C: BorrowMut PlacementGeneratetagCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Discovery {} @@ -285,6 +287,8 @@ impl<'a, C, A> Discovery client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/discovery/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -301,6 +305,26 @@ impl<'a, C, A> Discovery self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/discovery/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -953,7 +977,7 @@ impl<'a, C, A> ApiGetRestCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/discovery/v1/apis/{api}/{version}/rest".to_string(); + let mut url = self.hub._base_url.clone() + "apis/{api}/{version}/rest"; for &(find_this, param_name) in [("{api}", "api"), ("{version}", "version")].iter() { let mut replace_with: Option<&str> = None; @@ -1172,7 +1196,7 @@ impl<'a, C, A> ApiListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/discovery/v1/apis".to_string(); + let mut url = self.hub._base_url.clone() + "apis"; if params.len() > 0 { @@ -1287,4 +1311,3 @@ impl<'a, C, A> ApiListCall<'a, C, A> where C: BorrowMut, A: oauth } - diff --git a/gen/dns1/src/lib.rs b/gen/dns1/src/lib.rs index 1caa6e60d4..900e6ef4fa 100644 --- a/gen/dns1/src/lib.rs +++ b/gen/dns1/src/lib.rs @@ -182,7 +182,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -322,6 +322,8 @@ pub struct Dns { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Dns {} @@ -334,6 +336,8 @@ impl<'a, C, A> Dns client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/dns/v1/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -359,6 +363,26 @@ impl<'a, C, A> Dns self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/dns/v1/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1034,7 +1058,7 @@ impl<'a, C, A> ChangeCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}/changes".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones/{managedZone}/changes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1325,7 +1349,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}/changes".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones/{managedZone}/changes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevClouddnReadonly.as_ref().to_string(), ()); } @@ -1602,7 +1626,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones/{managedZone}/changes/{changeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevClouddnReadonly.as_ref().to_string(), ()); } @@ -1864,7 +1888,7 @@ impl<'a, C, A> ManagedZoneCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2124,7 +2148,7 @@ impl<'a, C, A> ManagedZoneDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones/{managedZone}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2361,7 +2385,7 @@ impl<'a, C, A> ManagedZoneGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones/{managedZone}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevClouddnReadonly.as_ref().to_string(), ()); } @@ -2621,7 +2645,7 @@ impl<'a, C, A> ManagedZoneListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}/managedZones".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/managedZones"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevClouddnReadonly.as_ref().to_string(), ()); } @@ -2899,7 +2923,7 @@ impl<'a, C, A> ResourceRecordSetListCall<'a, C, A> where C: BorrowMut ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/dns/v1/projects/{project}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevClouddnReadonly.as_ref().to_string(), ()); } @@ -3337,4 +3361,3 @@ impl<'a, C, A> ProjectGetCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/doubleclickbidmanager1/src/lib.rs b/gen/doubleclickbidmanager1/src/lib.rs index edb663362c..6769288a4a 100644 --- a/gen/doubleclickbidmanager1/src/lib.rs +++ b/gen/doubleclickbidmanager1/src/lib.rs @@ -177,7 +177,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -280,6 +280,8 @@ pub struct DoubleClickBidManager { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for DoubleClickBidManager {} @@ -292,6 +294,8 @@ impl<'a, C, A> DoubleClickBidManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/doubleclickbidmanager/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -317,6 +321,26 @@ impl<'a, C, A> DoubleClickBidManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/doubleclickbidmanager/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1203,7 +1227,7 @@ impl<'a, C, A> SdfDownloadCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/sdf/download".to_string(); + let mut url = self.hub._base_url.clone() + "sdf/download"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1414,7 +1438,7 @@ impl<'a, C, A> LineitemUploadlineitemCall<'a, C, A> where C: BorrowMut LineitemDownloadlineitemCall<'a, C, A> where C: BorrowMut ReportListreportCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/queries/{queryId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "queries/{queryId}/reports"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2042,7 +2066,7 @@ impl<'a, C, A> QueryListqueryCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/queries".to_string(); + let mut url = self.hub._base_url.clone() + "queries"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2224,7 +2248,7 @@ impl<'a, C, A> QueryGetqueryCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); + let mut url = self.hub._base_url.clone() + "query/{queryId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2442,7 +2466,7 @@ impl<'a, C, A> QueryCreatequeryCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query".to_string(); + let mut url = self.hub._base_url.clone() + "query"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2647,7 +2671,7 @@ impl<'a, C, A> QueryDeletequeryCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); + let mut url = self.hub._base_url.clone() + "query/{queryId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2856,7 +2880,7 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/doubleclickbidmanager/v1/query/{queryId}".to_string(); + let mut url = self.hub._base_url.clone() + "query/{queryId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3014,4 +3038,3 @@ impl<'a, C, A> QueryRunqueryCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/doubleclicksearch2/src/lib.rs b/gen/doubleclicksearch2/src/lib.rs index a96313830f..428669853a 100644 --- a/gen/doubleclicksearch2/src/lib.rs +++ b/gen/doubleclicksearch2/src/lib.rs @@ -181,7 +181,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -306,6 +306,8 @@ pub struct Doubleclicksearch { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Doubleclicksearch {} @@ -318,6 +320,8 @@ impl<'a, C, A> Doubleclicksearch client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/doubleclicksearch/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -340,6 +344,26 @@ impl<'a, C, A> Doubleclicksearch self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/doubleclicksearch/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1294,7 +1318,7 @@ impl<'a, C, A> ConversionInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/conversion".to_string(); + let mut url = self.hub._base_url.clone() + "conversion"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1554,7 +1578,7 @@ impl<'a, C, A> ConversionGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion".to_string(); + let mut url = self.hub._base_url.clone() + "agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1882,7 +1906,7 @@ impl<'a, C, A> ConversionUpdateAvailabilityCall<'a, C, A> where C: BorrowMut ConversionPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/conversion".to_string(); + let mut url = self.hub._base_url.clone() + "conversion"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2432,7 +2456,7 @@ impl<'a, C, A> ConversionUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/conversion".to_string(); + let mut url = self.hub._base_url.clone() + "conversion"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2662,7 +2686,7 @@ impl<'a, C, A> SavedColumnListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/agency/{agencyId}/advertiser/{advertiserId}/savedcolumns".to_string(); + let mut url = self.hub._base_url.clone() + "agency/{agencyId}/advertiser/{advertiserId}/savedcolumns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2911,7 +2935,7 @@ impl<'a, C, A> ReportGetFileCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/reports/{reportId}/files/{reportFragment}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}/files/{reportFragment}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3151,7 +3175,7 @@ impl<'a, C, A> ReportGenerateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/reports/generate".to_string(); + let mut url = self.hub._base_url.clone() + "reports/generate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3379,7 +3403,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3619,7 +3643,7 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/doubleclicksearch/v2/reports".to_string(); + let mut url = self.hub._base_url.clone() + "reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3777,4 +3801,3 @@ impl<'a, C, A> ReportRequestCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/drive2/src/lib.rs b/gen/drive2/src/lib.rs index 6372609ec5..90117fb6cf 100644 --- a/gen/drive2/src/lib.rs +++ b/gen/drive2/src/lib.rs @@ -247,7 +247,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -423,6 +423,8 @@ pub struct Drive { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Drive {} @@ -435,6 +437,8 @@ impl<'a, C, A> Drive client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/drive/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -487,6 +491,26 @@ impl<'a, C, A> Drive self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/drive/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -3844,7 +3868,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/watch".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4180,9 +4204,9 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/drive/v2/files".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/drive/v2/files", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/drive/v2/files".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files", "resumable") } else { unreachable!() }; @@ -4574,7 +4598,7 @@ impl<'a, C, A> FileUntrashCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/untrash".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/untrash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4851,7 +4875,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/copy".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/copy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5159,7 +5183,7 @@ impl<'a, C, A> FileTrashCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/trash".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/trash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5398,7 +5422,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/export".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/export"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5630,7 +5654,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v2/files/trash".to_string(); + let mut url = self.hub._base_url.clone() + "files/trash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5857,7 +5881,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files".to_string(); + let mut url = self.hub._base_url.clone() + "files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); } @@ -6110,7 +6134,7 @@ impl<'a, C, A> FileTouchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/touch".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/touch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6353,7 +6377,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/generateIds".to_string(); + let mut url = self.hub._base_url.clone() + "files/generateIds"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6647,9 +6671,9 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/drive/v2/files/{fileId}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/drive/v2/files/{fileId}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/drive/v2/files/{fileId}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files/{fileId}", "resumable") } else { unreachable!() }; @@ -7106,7 +7130,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7403,7 +7427,7 @@ impl<'a, C, A> FilePatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7794,7 +7818,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -8070,7 +8094,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/about".to_string(); + let mut url = self.hub._base_url.clone() + "about"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -8303,9 +8327,9 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/drive/v2/files/{fileId}/realtime".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/drive/v2/files/{fileId}/realtime", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/drive/v2/files/{fileId}/realtime".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/drive/v2/files/{fileId}/realtime", "resumable") } else { unreachable!() }; @@ -8647,7 +8671,7 @@ impl<'a, C, A> RealtimeGetCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/realtime".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/realtime"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8879,7 +8903,7 @@ impl<'a, C, A> AppGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/apps/{appId}".to_string(); + let mut url = self.hub._base_url.clone() + "apps/{appId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); } @@ -9127,7 +9151,7 @@ impl<'a, C, A> AppListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/apps".to_string(); + let mut url = self.hub._base_url.clone() + "apps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); } @@ -9353,7 +9377,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9595,7 +9619,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9854,7 +9878,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10122,7 +10146,7 @@ impl<'a, C, A> CommentPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10400,7 +10424,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10689,7 +10713,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10972,7 +10996,7 @@ impl<'a, C, A> ChildrenListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children".to_string(); + let mut url = self.hub._base_url.clone() + "files/{folderId}/children"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -11237,7 +11261,7 @@ impl<'a, C, A> ChildrenGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children/{childId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{folderId}/children/{childId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -11483,7 +11507,7 @@ impl<'a, C, A> ChildrenDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children/{childId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{folderId}/children/{childId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11725,7 +11749,7 @@ impl<'a, C, A> ChildrenInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{folderId}/children".to_string(); + let mut url = self.hub._base_url.clone() + "files/{folderId}/children"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11988,7 +12012,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/drive/v2/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12206,7 +12230,7 @@ impl<'a, C, A> ParentListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/parents"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -12442,7 +12466,7 @@ impl<'a, C, A> ParentDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/parents/{parentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12684,7 +12708,7 @@ impl<'a, C, A> ParentInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/parents"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12945,7 +12969,7 @@ impl<'a, C, A> ParentGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/parents/{parentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/parents/{parentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -13201,7 +13225,7 @@ impl<'a, C, A> ReplyPatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13497,7 +13521,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -13772,7 +13796,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -14043,7 +14067,7 @@ impl<'a, C, A> ReplyInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14315,7 +14339,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14571,7 +14595,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14851,7 +14875,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15103,7 +15127,7 @@ impl<'a, C, A> PermissionInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15395,7 +15419,7 @@ impl<'a, C, A> PermissionPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15678,7 +15702,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -15932,7 +15956,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16217,7 +16241,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -16462,7 +16486,7 @@ impl<'a, C, A> PermissionGetIdForEmailCall<'a, C, A> where C: BorrowMut ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/changes/watch".to_string(); + let mut url = self.hub._base_url.clone() + "changes/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17030,7 +17054,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/changes".to_string(); + let mut url = self.hub._base_url.clone() + "changes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); } @@ -17276,7 +17300,7 @@ impl<'a, C, A> ChangeGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/changes/{changeId}".to_string(); + let mut url = self.hub._base_url.clone() + "changes/{changeId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppReadonly.as_ref().to_string(), ()); } @@ -17525,7 +17549,7 @@ impl<'a, C, A> PropertyPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties/{propertyKey}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties/{propertyKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17807,7 +17831,7 @@ impl<'a, C, A> PropertyDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties/{propertyKey}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties/{propertyKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18056,7 +18080,7 @@ impl<'a, C, A> PropertyInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18315,7 +18339,7 @@ impl<'a, C, A> PropertyListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -18564,7 +18588,7 @@ impl<'a, C, A> PropertyUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties/{propertyKey}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties/{propertyKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18847,7 +18871,7 @@ impl<'a, C, A> PropertyGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/properties/{propertyKey}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/properties/{propertyKey}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -19101,7 +19125,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -19355,7 +19379,7 @@ impl<'a, C, A> RevisionPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19625,7 +19649,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -19869,7 +19893,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -20148,7 +20172,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v2/files/{fileId}/revisions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -20327,4 +20351,3 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/drive3/src/lib.rs b/gen/drive3/src/lib.rs index 28addde23c..ad46cf3f83 100644 --- a/gen/drive3/src/lib.rs +++ b/gen/drive3/src/lib.rs @@ -225,7 +225,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -390,6 +390,8 @@ pub struct Drive { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Drive {} @@ -402,6 +404,8 @@ impl<'a, C, A> Drive client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/drive/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -439,6 +443,26 @@ impl<'a, C, A> Drive self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/drive/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2436,9 +2460,9 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/drive/v3/files/{fileId}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/drive/v3/files/{fileId}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/drive/v3/files/{fileId}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/drive/v3/files/{fileId}", "resumable") } else { unreachable!() }; @@ -2873,7 +2897,7 @@ impl<'a, C, A> FileWatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/watch".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3161,7 +3185,7 @@ impl<'a, C, A> FileCopyCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/copy".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/copy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3445,7 +3469,7 @@ impl<'a, C, A> FileExportCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/export".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/export"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3677,7 +3701,7 @@ impl<'a, C, A> FileEmptyTrashCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v3/files/trash".to_string(); + let mut url = self.hub._base_url.clone() + "files/trash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3899,7 +3923,7 @@ impl<'a, C, A> FileListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files".to_string(); + let mut url = self.hub._base_url.clone() + "files"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -4153,7 +4177,7 @@ impl<'a, C, A> FileGenerateIdCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/generateIds".to_string(); + let mut url = self.hub._base_url.clone() + "files/generateIds"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4400,9 +4424,9 @@ impl<'a, C, A> FileCreateCall<'a, C, A> where C: BorrowMut, A: oa let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/drive/v3/files".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/drive/v3/files", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/drive/v3/files".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/drive/v3/files", "resumable") } else { unreachable!() }; @@ -4765,7 +4789,7 @@ impl<'a, C, A> FileDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5016,7 +5040,7 @@ impl<'a, C, A> FileGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -5256,7 +5280,7 @@ impl<'a, C, A> AboutGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/about".to_string(); + let mut url = self.hub._base_url.clone() + "about"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -5461,7 +5485,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5703,7 +5727,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5964,7 +5988,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6240,7 +6264,7 @@ impl<'a, C, A> CommentCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6519,7 +6543,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6786,7 +6810,7 @@ impl<'a, C, A> ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/drive/v3/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7013,7 +7037,7 @@ impl<'a, C, A> ReplyCreateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7285,7 +7309,7 @@ impl<'a, C, A> ReplyDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7547,7 +7571,7 @@ impl<'a, C, A> ReplyListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7822,7 +7846,7 @@ impl<'a, C, A> ReplyGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8095,7 +8119,7 @@ impl<'a, C, A> ReplyUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/comments/{commentId}/replies/{replyId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/comments/{commentId}/replies/{replyId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8383,7 +8407,7 @@ impl<'a, C, A> RevisionUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8680,7 +8704,7 @@ impl<'a, C, A> RevisionGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -8933,7 +8957,7 @@ impl<'a, C, A> RevisionDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/revisions/{revisionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions/{revisionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9178,7 +9202,7 @@ impl<'a, C, A> RevisionListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/revisions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/revisions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -9425,7 +9449,7 @@ impl<'a, C, A> ChangeGetStartPageTokenCall<'a, C, A> where C: BorrowMut ChangeWatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/changes/watch".to_string(); + let mut url = self.hub._base_url.clone() + "changes/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9942,7 +9966,7 @@ impl<'a, C, A> ChangeListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/changes".to_string(); + let mut url = self.hub._base_url.clone() + "changes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -10185,7 +10209,7 @@ impl<'a, C, A> PermissionDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10420,7 +10444,7 @@ impl<'a, C, A> PermissionListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -10674,7 +10698,7 @@ impl<'a, C, A> PermissionUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10959,7 +10983,7 @@ impl<'a, C, A> PermissionGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions/{permissionId}".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions/{permissionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::MetadataReadonly.as_ref().to_string(), ()); } @@ -11226,7 +11250,7 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/drive/v3/files/{fileId}/permissions".to_string(); + let mut url = self.hub._base_url.clone() + "files/{fileId}/permissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11436,4 +11460,3 @@ impl<'a, C, A> PermissionCreateCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/firebasedynamiclinks1/src/lib.rs b/gen/firebasedynamiclinks1/src/lib.rs index 870a7f6fea..74c153613d 100644 --- a/gen/firebasedynamiclinks1/src/lib.rs +++ b/gen/firebasedynamiclinks1/src/lib.rs @@ -176,7 +176,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -307,6 +307,8 @@ pub struct FirebaseDynamicLinks { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for FirebaseDynamicLinks {} @@ -319,6 +321,8 @@ impl<'a, C, A> FirebaseDynamicLinks client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://firebasedynamiclinks.googleapis.com/".to_string(), + _root_url: "https://firebasedynamiclinks.googleapis.com/".to_string(), } } @@ -335,6 +339,26 @@ impl<'a, C, A> FirebaseDynamicLinks self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://firebasedynamiclinks.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://firebasedynamiclinks.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -772,7 +796,7 @@ impl<'a, C, A> ShortLinkCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://firebasedynamiclinks.googleapis.com/v1/shortLinks".to_string(); + let mut url = self.hub._base_url.clone() + "v1/shortLinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Firebase.as_ref().to_string(), ()); } @@ -936,4 +960,3 @@ impl<'a, C, A> ShortLinkCreateCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/fitness1/src/lib.rs b/gen/fitness1/src/lib.rs index 712f79cc97..167de51b0c 100644 --- a/gen/fitness1/src/lib.rs +++ b/gen/fitness1/src/lib.rs @@ -180,7 +180,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -379,6 +379,8 @@ pub struct Fitness { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Fitness {} @@ -391,6 +393,8 @@ impl<'a, C, A> Fitness client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/fitness/v1/users/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -407,6 +411,26 @@ impl<'a, C, A> Fitness self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/fitness/v1/users/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1339,7 +1363,7 @@ impl<'a, C, A> UserDatasetAggregateCall<'a, C, A> where C: BorrowMut UserDataSourceDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetGetCall<'a, C, A> where C: BorrowMut UserDataSourceCreateCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetDeleteCall<'a, C, A> where C: BorrowMut UserDataSourceDatasetPatchCall<'a, C, A> where C: BorrowMut UserSessionDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/sessions/{sessionId}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/sessions/{sessionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ActivityWrite.as_ref().to_string(), ()); } @@ -3218,7 +3242,7 @@ impl<'a, C, A> UserDataSourceGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/dataSources/{dataSourceId}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/dataSources/{dataSourceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ActivityRead.as_ref().to_string(), ()); } @@ -3474,7 +3498,7 @@ impl<'a, C, A> UserDataSourceUpdateCall<'a, C, A> where C: BorrowMut UserSessionListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/sessions".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/sessions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ActivityRead.as_ref().to_string(), ()); } @@ -4040,7 +4064,7 @@ impl<'a, C, A> UserSessionUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fitness/v1/users/{userId}/sessions/{sessionId}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/sessions/{sessionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ActivityWrite.as_ref().to_string(), ()); } @@ -4327,7 +4351,7 @@ impl<'a, C, A> UserDataSourcePatchCall<'a, C, A> where C: BorrowMut UserDataSourceListCall<'a, C, A> where C: BorrowMut UserDataSourceListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Fusiontables {} @@ -343,6 +345,8 @@ impl<'a, C, A> Fusiontables client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/fusiontables/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -374,6 +378,26 @@ impl<'a, C, A> Fusiontables self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/fusiontables/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1931,7 +1955,7 @@ impl<'a, C, A> StyleListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2189,7 +2213,7 @@ impl<'a, C, A> StyleUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles/{styleId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles/{styleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2465,7 +2489,7 @@ impl<'a, C, A> StyleInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2726,7 +2750,7 @@ impl<'a, C, A> StyleGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles/{styleId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles/{styleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2972,7 +2996,7 @@ impl<'a, C, A> StyleDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles/{styleId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles/{styleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3216,7 +3240,7 @@ impl<'a, C, A> StylePatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/styles/{styleId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/styles/{styleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3500,7 +3524,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/tasks".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/tasks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3757,7 +3781,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/tasks/{taskId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/tasks/{taskId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3994,7 +4018,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/tasks/{taskId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/tasks/{taskId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4246,7 +4270,7 @@ impl<'a, C, A> ColumnInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4514,7 +4538,7 @@ impl<'a, C, A> ColumnUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns/{columnId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns/{columnId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4793,7 +4817,7 @@ impl<'a, C, A> ColumnListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5051,7 +5075,7 @@ impl<'a, C, A> ColumnPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns/{columnId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns/{columnId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5321,7 +5345,7 @@ impl<'a, C, A> ColumnDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns/{columnId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns/{columnId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5558,7 +5582,7 @@ impl<'a, C, A> ColumnGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/columns/{columnId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/columns/{columnId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5812,7 +5836,7 @@ impl<'a, C, A> TemplateUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates/{templateId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates/{templateId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6091,7 +6115,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6341,7 +6365,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates/{templateId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates/{templateId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6583,7 +6607,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6851,7 +6875,7 @@ impl<'a, C, A> TemplatePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates/{templateId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates/{templateId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7122,7 +7146,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/templates/{templateId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/templates/{templateId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7401,7 +7425,7 @@ impl<'a, C, A> QuerySqlGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/fusiontables/v2/query".to_string(); + let mut url = self.hub._base_url.clone() + "query"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7670,7 +7694,7 @@ impl<'a, C, A> QuerySqlCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/fusiontables/v2/query".to_string(); + let mut url = self.hub._base_url.clone() + "query"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7917,7 +7941,7 @@ impl<'a, C, A> TablePatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8212,9 +8236,9 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/fusiontables/v2/tables/{tableId}/replace".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/{tableId}/replace", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/fusiontables/v2/tables/{tableId}/replace".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/{tableId}/replace", "resumable") } else { unreachable!() }; @@ -8599,7 +8623,7 @@ impl<'a, C, A> TableUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8864,7 +8888,7 @@ impl<'a, C, A> TableDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9094,7 +9118,7 @@ impl<'a, C, A> TableInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables".to_string(); + let mut url = self.hub._base_url.clone() + "tables"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9322,7 +9346,7 @@ impl<'a, C, A> TableGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9565,7 +9589,7 @@ impl<'a, C, A> TableListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables".to_string(); + let mut url = self.hub._base_url.clone() + "tables"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9812,9 +9836,9 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/fusiontables/v2/tables/{tableId}/import".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/{tableId}/import", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/fusiontables/v2/tables/{tableId}/import".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/{tableId}/import", "resumable") } else { unreachable!() }; @@ -10201,9 +10225,9 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/fusiontables/v2/tables/import".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/fusiontables/v2/tables/import", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/fusiontables/v2/tables/import".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/fusiontables/v2/tables/import", "resumable") } else { unreachable!() }; @@ -10539,7 +10563,7 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/fusiontables/v2/tables/{tableId}/copy".to_string(); + let mut url = self.hub._base_url.clone() + "tables/{tableId}/copy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10711,4 +10735,3 @@ impl<'a, C, A> TableCopyCall<'a, C, A> where C: BorrowMut, A: oau } - diff --git a/gen/games1/src/lib.rs b/gen/games1/src/lib.rs index 87d598b394..b6a9cae849 100644 --- a/gen/games1/src/lib.rs +++ b/gen/games1/src/lib.rs @@ -208,7 +208,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -344,6 +344,8 @@ pub struct Games { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Games {} @@ -356,6 +358,8 @@ impl<'a, C, A> Games client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/games/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -414,6 +418,26 @@ impl<'a, C, A> Games self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/games/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -4918,7 +4942,7 @@ impl<'a, C, A> AchievementListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/achievements".to_string(); + let mut url = self.hub._base_url.clone() + "players/{playerId}/achievements"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -5200,7 +5224,7 @@ impl<'a, C, A> AchievementIncrementCall<'a, C, A> where C: BorrowMut AchievementSetStepsAtLeastCall<'a, C, A> where C: BorrowMut AchievementUpdateMultipleCall<'a, C, A> where C: BorrowMut AchievementRevealCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/achievements/{achievementId}/reveal".to_string(); + let mut url = self.hub._base_url.clone() + "achievements/{achievementId}/reveal"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6215,7 +6239,7 @@ impl<'a, C, A> AchievementUnlockCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/achievements/{achievementId}/unlock".to_string(); + let mut url = self.hub._base_url.clone() + "achievements/{achievementId}/unlock"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6467,7 +6491,7 @@ impl<'a, C, A> LeaderboardGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards/{leaderboardId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6734,7 +6758,7 @@ impl<'a, C, A> LeaderboardListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/leaderboards".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -6988,7 +7012,7 @@ impl<'a, C, A> MetagameListCategoriesByPlayerCall<'a, C, A> where C: BorrowMut MetagameGetMetagameConfigCall<'a, C, A> where C: BorrowMut PlayerListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/me/players/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "players/me/players/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -7768,7 +7792,7 @@ impl<'a, C, A> PlayerGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/{playerId}".to_string(); + let mut url = self.hub._base_url.clone() + "players/{playerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8027,7 +8051,7 @@ impl<'a, C, A> QuestAcceptCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/quests/{questId}/accept".to_string(); + let mut url = self.hub._base_url.clone() + "quests/{questId}/accept"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8296,7 +8320,7 @@ impl<'a, C, A> QuestListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/quests".to_string(); + let mut url = self.hub._base_url.clone() + "players/{playerId}/quests"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -8569,7 +8593,7 @@ impl<'a, C, A> SnapshotGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/snapshots/{snapshotId}".to_string(); + let mut url = self.hub._base_url.clone() + "snapshots/{snapshotId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); } @@ -8838,7 +8862,7 @@ impl<'a, C, A> SnapshotListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/snapshots".to_string(); + let mut url = self.hub._base_url.clone() + "players/{playerId}/snapshots"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DriveAppdata.as_ref().to_string(), ()); } @@ -9105,7 +9129,7 @@ impl<'a, C, A> TurnBasedMatcheDismisCall<'a, C, A> where C: BorrowMut TurnBasedMatcheSyncCall<'a, C, A> where C: BorrowMut TurnBasedMatcheDeclineCall<'a, C, A> where C: BorrowMut TurnBasedMatcheGetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCreateCall<'a, C, A> where C: BorrowMut TurnBasedMatcheJoinCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheCancelCall<'a, C, A> where C: BorrowMut TurnBasedMatcheFinishCall<'a, C, A> where C: BorrowMut TurnBasedMatcheLeaveCall<'a, C, A> where C: BorrowMut TurnBasedMatcheListCall<'a, C, A> where C: BorrowMut TurnBasedMatcheTakeTurnCall<'a, C, A> where C: BorrowMut TurnBasedMatcheRematchCall<'a, C, A> where C: BorrowMut ApplicationVerifyCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/applications/{applicationId}/verify".to_string(); + let mut url = self.hub._base_url.clone() + "applications/{applicationId}/verify"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12822,7 +12846,7 @@ impl<'a, C, A> ApplicationGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/applications/{applicationId}".to_string(); + let mut url = self.hub._base_url.clone() + "applications/{applicationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13080,7 +13104,7 @@ impl<'a, C, A> ApplicationPlayedCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/games/v1/applications/played".to_string(); + let mut url = self.hub._base_url.clone() + "applications/played"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13291,7 +13315,7 @@ impl<'a, C, A> RoomGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13557,7 +13581,7 @@ impl<'a, C, A> RoomLeaveCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/leave".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}/leave"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13848,7 +13872,7 @@ impl<'a, C, A> RoomListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms".to_string(); + let mut url = self.hub._base_url.clone() + "rooms"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14097,7 +14121,7 @@ impl<'a, C, A> RoomReportStatuCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/reportstatus".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}/reportstatus"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14385,7 +14409,7 @@ impl<'a, C, A> RoomCreateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/create".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/create"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14637,7 +14661,7 @@ impl<'a, C, A> RoomDeclineCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/decline".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}/decline"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14890,7 +14914,7 @@ impl<'a, C, A> RoomDismisCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/dismiss".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}/dismiss"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15139,7 +15163,7 @@ impl<'a, C, A> RoomJoinCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/rooms/{roomId}/join".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/{roomId}/join"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15429,7 +15453,7 @@ impl<'a, C, A> ScoreSubmitCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards/{leaderboardId}/scores"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15719,7 +15743,7 @@ impl<'a, C, A> ScoreListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/scores/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards/{leaderboardId}/scores/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16032,7 +16056,7 @@ impl<'a, C, A> ScoreGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}".to_string(); + let mut url = self.hub._base_url.clone() + "players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16337,7 +16361,7 @@ impl<'a, C, A> ScoreSubmitMultipleCall<'a, C, A> where C: BorrowMut ScoreListWindowCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/leaderboards/{leaderboardId}/window/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards/{leaderboardId}/window/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -16919,7 +16943,7 @@ impl<'a, C, A> PushtokenRemoveCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/games/v1/pushtokens/remove".to_string(); + let mut url = self.hub._base_url.clone() + "pushtokens/remove"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17153,7 +17177,7 @@ impl<'a, C, A> PushtokenUpdateCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/games/v1/pushtokens".to_string(); + let mut url = self.hub._base_url.clone() + "pushtokens"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17383,7 +17407,7 @@ impl<'a, C, A> RevisionCheckCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/revisions/check".to_string(); + let mut url = self.hub._base_url.clone() + "revisions/check"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -17627,7 +17651,7 @@ impl<'a, C, A> EventListDefinitionCall<'a, C, A> where C: BorrowMut EventRecordCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/events".to_string(); + let mut url = self.hub._base_url.clone() + "events"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18134,7 +18158,7 @@ impl<'a, C, A> EventListByPlayerCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1/events".to_string(); + let mut url = self.hub._base_url.clone() + "events"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -18374,7 +18398,7 @@ impl<'a, C, A> QuestMilestoneClaimCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> where C: BorrowMut AchievementDefinitionListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for GamesConfiguration {} @@ -324,6 +326,8 @@ impl<'a, C, A> GamesConfiguration client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/games/v1configuration/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -346,6 +350,26 @@ impl<'a, C, A> GamesConfiguration self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/games/v1configuration/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1099,9 +1123,9 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut AchievementConfigurationListCall<'a, C, A> where C: BorrowMut AchievementConfigurationUpdateCall<'a, C, A> where C: BorrowMut AchievementConfigurationInsertCall<'a, C, A> where C: BorrowMut AchievementConfigurationGetCall<'a, C, A> where C: BorrowMut AchievementConfigurationPatchCall<'a, C, A> where C: BorrowMut AchievementConfigurationDeleteCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationInsertCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationGetCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationPatchCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationUpdateCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationListCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut LeaderboardConfigurationDeleteCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for GamesManagement {} @@ -326,6 +328,8 @@ impl<'a, C, A> GamesManagement client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/games/v1management/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -363,6 +367,26 @@ impl<'a, C, A> GamesManagement self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/games/v1management/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1543,7 +1567,7 @@ impl<'a, C, A> AchievementResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/games/v1management/achievements/resetAllForAllPlayers".to_string(); + let mut url = self.hub._base_url.clone() + "achievements/resetAllForAllPlayers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -1736,7 +1760,7 @@ impl<'a, C, A> AchievementResetForAllPlayerCall<'a, C, A> where C: BorrowMut AchievementResetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1management/achievements/{achievementId}/reset".to_string(); + let mut url = self.hub._base_url.clone() + "achievements/{achievementId}/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -2200,7 +2224,7 @@ impl<'a, C, A> AchievementResetMultipleForAllPlayerCall<'a, C, A> where C: Borro } - let mut url = "https://www.googleapis.com/games/v1management/achievements/resetMultipleForAllPlayers".to_string(); + let mut url = self.hub._base_url.clone() + "achievements/resetMultipleForAllPlayers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -2416,7 +2440,7 @@ impl<'a, C, A> AchievementResetAllCall<'a, C, A> where C: BorrowMut PlayerHideCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/games/v1management/applications/{applicationId}/players/hidden/{playerId}".to_string(); + let mut url = self.hub._base_url.clone() + "applications/{applicationId}/players/hidden/{playerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -2857,7 +2881,7 @@ impl<'a, C, A> PlayerUnhideCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/games/v1management/applications/{applicationId}/players/hidden/{playerId}".to_string(); + let mut url = self.hub._base_url.clone() + "applications/{applicationId}/players/hidden/{playerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -3096,7 +3120,7 @@ impl<'a, C, A> ScoreResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetAllCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1management/scores/reset".to_string(); + let mut url = self.hub._base_url.clone() + "scores/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -3706,7 +3730,7 @@ impl<'a, C, A> ScoreResetForAllPlayerCall<'a, C, A> where C: BorrowMut ScoreResetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/games/v1management/leaderboards/{leaderboardId}/scores/reset".to_string(); + let mut url = self.hub._base_url.clone() + "leaderboards/{leaderboardId}/scores/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -4163,7 +4187,7 @@ impl<'a, C, A> TurnBasedMatcheResetCall<'a, C, A> where C: BorrowMut TurnBasedMatcheResetForAllPlayerCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/games/v1management/turnbasedmatches/resetForAllPlayers".to_string(); + let mut url = self.hub._base_url.clone() + "turnbasedmatches/resetForAllPlayers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -4558,7 +4582,7 @@ impl<'a, C, A> ApplicationListHiddenCall<'a, C, A> where C: BorrowMut RoomResetForAllPlayerCall<'a, C, A> where C: BorrowMut RoomResetCall<'a, C, A> where C: BorrowMut, A: oau } - let mut url = "https://www.googleapis.com/games/v1management/rooms/reset".to_string(); + let mut url = self.hub._base_url.clone() + "rooms/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -5186,7 +5210,7 @@ impl<'a, C, A> QuestResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetAllCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/games/v1management/quests/reset".to_string(); + let mut url = self.hub._base_url.clone() + "quests/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -5792,7 +5816,7 @@ impl<'a, C, A> QuestResetForAllPlayerCall<'a, C, A> where C: BorrowMut QuestResetCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/games/v1management/quests/{questId}/reset".to_string(); + let mut url = self.hub._base_url.clone() + "quests/{questId}/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -6238,7 +6262,7 @@ impl<'a, C, A> EventResetAllForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/games/v1management/events/{eventId}/reset".to_string(); + let mut url = self.hub._base_url.clone() + "events/{eventId}/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -6653,7 +6677,7 @@ impl<'a, C, A> EventResetAllCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/games/v1management/events/reset".to_string(); + let mut url = self.hub._base_url.clone() + "events/reset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Game.as_ref().to_string(), ()); } @@ -6851,7 +6875,7 @@ impl<'a, C, A> EventResetMultipleForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut EventResetForAllPlayerCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Gan {} @@ -323,6 +325,8 @@ impl<'a, C, A> Gan client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/gan/v1beta1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -354,6 +358,26 @@ impl<'a, C, A> Gan self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/gan/v1beta1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1726,7 +1750,7 @@ impl<'a, C, A> PublisherListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/publishers".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/publishers"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2005,7 +2029,7 @@ impl<'a, C, A> PublisherGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/publisher".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/publisher"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2244,7 +2268,7 @@ impl<'a, C, A> LinkInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/link".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/link"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2495,7 +2519,7 @@ impl<'a, C, A> LinkGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/link/{linkId}".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/link/{linkId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2801,7 +2825,7 @@ impl<'a, C, A> LinkListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/links".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/links"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3185,7 +3209,7 @@ impl<'a, C, A> ReportGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/report/{reportType}".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/report/{reportType}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3511,7 +3535,7 @@ impl<'a, C, A> CcOfferListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/publishers/{publisher}/ccOffers".to_string(); + let mut url = self.hub._base_url.clone() + "publishers/{publisher}/ccOffers"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3746,7 +3770,7 @@ impl<'a, C, A> AdvertiserGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/advertiser".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/advertiser"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -4013,7 +4037,7 @@ impl<'a, C, A> AdvertiserListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/advertisers".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/advertisers"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -4367,7 +4391,7 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gan/v1beta1/{role}/{roleId}/events".to_string(); + let mut url = self.hub._base_url.clone() + "{role}/{roleId}/events"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -4633,4 +4657,3 @@ impl<'a, C, A> EventListCall<'a, C, A> where C: BorrowMut, A: oau } - diff --git a/gen/genomics1/src/lib.rs b/gen/genomics1/src/lib.rs index a386aef3d8..64ffd2b429 100644 --- a/gen/genomics1/src/lib.rs +++ b/gen/genomics1/src/lib.rs @@ -205,7 +205,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -353,6 +353,8 @@ pub struct Genomics { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Genomics {} @@ -365,6 +367,8 @@ impl<'a, C, A> Genomics client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://genomics.googleapis.com/".to_string(), + _root_url: "https://genomics.googleapis.com/".to_string(), } } @@ -411,6 +415,26 @@ impl<'a, C, A> Genomics self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://genomics.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://genomics.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -3808,7 +3832,7 @@ impl<'a, C, A> OperationCancelCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/{+name}:cancel".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}:cancel"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4077,7 +4101,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4337,7 +4361,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4607,7 +4631,7 @@ impl<'a, C, A> DatasetCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4841,7 +4865,7 @@ impl<'a, C, A> DatasetDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5089,7 +5113,7 @@ impl<'a, C, A> DatasetUndeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets/{datasetId}:undelete".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets/{datasetId}:undelete"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5362,7 +5386,7 @@ impl<'a, C, A> DatasetSetIamPolicyCall<'a, C, A> where C: BorrowMut DatasetTestIamPermissionCall<'a, C, A> where C: BorrowMut DatasetGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6160,7 +6184,7 @@ impl<'a, C, A> DatasetListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6399,7 +6423,7 @@ impl<'a, C, A> DatasetGetIamPolicyCall<'a, C, A> where C: BorrowMut DatasetPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/datasets/{datasetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/datasets/{datasetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6956,7 +6980,7 @@ impl<'a, C, A> ReferencesetSearchCall<'a, C, A> where C: BorrowMut ReferencesetGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/referencesets/{referenceSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/referencesets/{referenceSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7436,7 +7460,7 @@ impl<'a, C, A> CallsetSearchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/callsets/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/callsets/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7682,7 +7706,7 @@ impl<'a, C, A> CallsetPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/callsets/{callSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/callsets/{callSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7959,7 +7983,7 @@ impl<'a, C, A> CallsetCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/callsets".to_string(); + let mut url = self.hub._base_url.clone() + "v1/callsets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8193,7 +8217,7 @@ impl<'a, C, A> CallsetDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/callsets/{callSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/callsets/{callSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8434,7 +8458,7 @@ impl<'a, C, A> CallsetGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/callsets/{callSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/callsets/{callSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8680,7 +8704,7 @@ impl<'a, C, A> ReadSearchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/reads/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/reads/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8919,7 +8943,7 @@ impl<'a, C, A> ReadStreamCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/reads:stream".to_string(); + let mut url = self.hub._base_url.clone() + "v1/reads:stream"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9160,7 +9184,7 @@ impl<'a, C, A> ReadgroupsetExportCall<'a, C, A> where C: BorrowMut ReadgroupsetImportCall<'a, C, A> where C: BorrowMut ReadgroupsetPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/readgroupsets/{readGroupSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/readgroupsets/{readGroupSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9948,7 +9972,7 @@ impl<'a, C, A> ReadgroupsetGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/readgroupsets/{readGroupSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/readgroupsets/{readGroupSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10219,7 +10243,7 @@ impl<'a, C, A> ReadgroupsetCoveragebucketListCall<'a, C, A> where C: BorrowMut ReadgroupsetDeleteCall<'a, C, A> where C: BorrowMut ReadgroupsetSearchCall<'a, C, A> where C: BorrowMut ReferenceBaseListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/references/{referenceId}/bases".to_string(); + let mut url = self.hub._base_url.clone() + "v1/references/{referenceId}/bases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11276,7 +11300,7 @@ impl<'a, C, A> ReferenceSearchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/references/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/references/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11510,7 +11534,7 @@ impl<'a, C, A> ReferenceGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/references/{referenceId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/references/{referenceId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11756,7 +11780,7 @@ impl<'a, C, A> VariantSearchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11990,7 +12014,7 @@ impl<'a, C, A> VariantDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants/{variantId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants/{variantId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12231,7 +12255,7 @@ impl<'a, C, A> VariantGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants/{variantId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants/{variantId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -12477,7 +12501,7 @@ impl<'a, C, A> VariantMergeCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants:merge".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants:merge"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12716,7 +12740,7 @@ impl<'a, C, A> VariantImportCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants:import".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants:import"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12955,7 +12979,7 @@ impl<'a, C, A> VariantCreateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13201,7 +13225,7 @@ impl<'a, C, A> VariantPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants/{variantId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants/{variantId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13478,7 +13502,7 @@ impl<'a, C, A> VariantStreamCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variants:stream".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variants:stream"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13724,7 +13748,7 @@ impl<'a, C, A> AnnotationUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotations/{annotationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13996,7 +14020,7 @@ impl<'a, C, A> AnnotationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotations/{annotationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -14242,7 +14266,7 @@ impl<'a, C, A> AnnotationSearchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotations/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotations/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -14476,7 +14500,7 @@ impl<'a, C, A> AnnotationDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotations/{annotationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotations/{annotationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -14722,7 +14746,7 @@ impl<'a, C, A> AnnotationCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotations".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -14961,7 +14985,7 @@ impl<'a, C, A> AnnotationBatchCreateCall<'a, C, A> where C: BorrowMut AnnotationsetUpdateCall<'a, C, A> where C: BorrowMut AnnotationsetSearchCall<'a, C, A> where C: BorrowMut AnnotationsetCreateCall<'a, C, A> where C: BorrowMut AnnotationsetDeleteCall<'a, C, A> where C: BorrowMut AnnotationsetGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/annotationsets/{annotationSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/annotationsets/{annotationSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -16444,7 +16468,7 @@ impl<'a, C, A> VariantsetCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -16678,7 +16702,7 @@ impl<'a, C, A> VariantsetDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets/{variantSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets/{variantSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -16926,7 +16950,7 @@ impl<'a, C, A> VariantsetExportCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets/{variantSetId}:export".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets/{variantSetId}:export"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Bigquery.as_ref().to_string(), ()); } @@ -17203,7 +17227,7 @@ impl<'a, C, A> VariantsetPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets/{variantSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets/{variantSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -17480,7 +17504,7 @@ impl<'a, C, A> VariantsetSearchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets/search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets/search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -17714,7 +17738,7 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://genomics.googleapis.com/v1/variantsets/{variantSetId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/variantsets/{variantSetId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -17885,4 +17909,3 @@ impl<'a, C, A> VariantsetGetCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/gmail1/src/lib.rs b/gen/gmail1/src/lib.rs index 1f1cefae38..11110367eb 100644 --- a/gen/gmail1/src/lib.rs +++ b/gen/gmail1/src/lib.rs @@ -197,7 +197,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -369,6 +369,8 @@ pub struct Gmail { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Gmail {} @@ -381,6 +383,8 @@ impl<'a, C, A> Gmail client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/gmail/v1/users/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -397,6 +401,26 @@ impl<'a, C, A> Gmail self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/gmail/v1/users/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2546,7 +2570,7 @@ impl<'a, C, A> UserSettingUpdateVacationCall<'a, C, A> where C: BorrowMut UserLabelCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -3071,7 +3095,7 @@ impl<'a, C, A> UserSettingSendAListCall<'a, C, A> where C: BorrowMut UserSettingGetImapCall<'a, C, A> where C: BorrowMut UserMessageImportCall<'a, C, A> where C: BorrowMut let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/messages/import".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages/import", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/messages/import".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages/import", "resumable") } else { unreachable!() }; @@ -3969,7 +3993,7 @@ impl<'a, C, A> UserSettingFilterListCall<'a, C, A> where C: BorrowMut UserSettingForwardingAddresseGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/forwardingAddresses/{forwardingEmail}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4471,7 +4495,7 @@ impl<'a, C, A> UserHistoryListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/history".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/history"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4745,9 +4769,9 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/drafts".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/drafts".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts", "resumable") } else { unreachable!() }; @@ -5116,7 +5140,7 @@ impl<'a, C, A> UserSettingSendAGetCall<'a, C, A> where C: BorrowMut UserLabelDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -5599,7 +5623,7 @@ impl<'a, C, A> UserLabelGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -5844,7 +5868,7 @@ impl<'a, C, A> UserLabelListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6090,9 +6114,9 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/drafts/send".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts/send", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/drafts/send".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts/send", "resumable") } else { unreachable!() }; @@ -6461,7 +6485,7 @@ impl<'a, C, A> UserMessageUntrashCall<'a, C, A> where C: BorrowMut UserSettingGetPopCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/pop".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/pop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6948,7 +6972,7 @@ impl<'a, C, A> UserSettingUpdatePopCall<'a, C, A> where C: BorrowMut UserSettingGetVacationCall<'a, C, A> where C: BorrowMut UserMessageBatchDeleteCall<'a, C, A> where C: BorrowMut UserMessageDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/messages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -7940,7 +7964,7 @@ impl<'a, C, A> UserDraftGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/drafts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/drafts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -8205,9 +8229,9 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/drafts/{id}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/drafts/{id}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/drafts/{id}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/drafts/{id}", "resumable") } else { unreachable!() }; @@ -8593,7 +8617,7 @@ impl<'a, C, A> UserLabelUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -8889,7 +8913,7 @@ impl<'a, C, A> UserThreadListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -9162,7 +9186,7 @@ impl<'a, C, A> UserSettingFilterGetCall<'a, C, A> where C: BorrowMut UserMessageBatchModifyCall<'a, C, A> where C: BorrowMut UserLabelPatchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/labels/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/labels/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -9941,7 +9965,7 @@ impl<'a, C, A> UserDraftDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/drafts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/drafts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -10183,7 +10207,7 @@ impl<'a, C, A> UserSettingSendACreateCall<'a, C, A> where C: BorrowMut UserSettingUpdateAutoForwardingCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/autoForwarding".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/autoForwarding"; if self._scopes.len() == 0 { self._scopes.insert(Scope::SettingSharing.as_ref().to_string(), ()); } @@ -10710,7 +10734,7 @@ impl<'a, C, A> UserThreadUntrashCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/untrash".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads/{id}/untrash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -10964,7 +10988,7 @@ impl<'a, C, A> UserSettingSendAPatchCall<'a, C, A> where C: BorrowMut UserThreadModifyCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads/{id}/modify"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -11512,7 +11536,7 @@ impl<'a, C, A> UserThreadDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -11747,7 +11771,7 @@ impl<'a, C, A> UserSettingForwardingAddresseListCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/forwardingAddresses"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11986,7 +12010,7 @@ impl<'a, C, A> UserMessageAttachmentGetCall<'a, C, A> where C: BorrowMut UserMessageModifyCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}/modify".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/messages/{id}/modify"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -12533,7 +12557,7 @@ impl<'a, C, A> UserMessageGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/messages/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -12800,7 +12824,7 @@ impl<'a, C, A> UserWatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/watch".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -13060,7 +13084,7 @@ impl<'a, C, A> UserSettingFilterDeleteCall<'a, C, A> where C: BorrowMut UserDraftListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/drafts".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/drafts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -13585,7 +13609,7 @@ impl<'a, C, A> UserSettingUpdateImapCall<'a, C, A> where C: BorrowMut UserMessageSendCall<'a, C, A> where C: BorrowMut, let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/messages/send".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages/send", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/messages/send".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages/send", "resumable") } else { unreachable!() }; @@ -14226,7 +14250,7 @@ impl<'a, C, A> UserThreadTrashCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}/trash".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads/{id}/trash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -14470,7 +14494,7 @@ impl<'a, C, A> UserStopCall<'a, C, A> where C: BorrowMut, A: oaut } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/stop".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -14702,7 +14726,7 @@ impl<'a, C, A> UserSettingForwardingAddresseCreateCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/forwardingAddresses"; if self._scopes.len() == 0 { self._scopes.insert(Scope::SettingSharing.as_ref().to_string(), ()); } @@ -14988,7 +15012,7 @@ impl<'a, C, A> UserMessageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/messages".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/messages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -15268,7 +15292,7 @@ impl<'a, C, A> UserSettingSendAUpdateCall<'a, C, A> where C: BorrowMut UserSettingFilterCreateCall<'a, C, A> where C: BorrowMut UserMessageTrashCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}/trash".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/messages/{id}/trash"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Gmai.as_ref().to_string(), ()); } @@ -16050,7 +16074,7 @@ impl<'a, C, A> UserGetProfileCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/profile".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/profile"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -16299,7 +16323,7 @@ impl<'a, C, A> UserThreadGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/threads/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/threads/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -16560,7 +16584,7 @@ impl<'a, C, A> UserSettingSendAVerifyCall<'a, C, A> where C: BorrowMut UserMessageInsertCall<'a, C, A> where C: BorrowMut let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/gmail/v1/users/{userId}/messages".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/gmail/v1/users/{userId}/messages", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/gmail/v1/users/{userId}/messages".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/gmail/v1/users/{userId}/messages", "resumable") } else { unreachable!() }; @@ -17199,7 +17223,7 @@ impl<'a, C, A> UserSettingGetAutoForwardingCall<'a, C, A> where C: BorrowMut UserSettingSendADeleteCall<'a, C, A> where C: BorrowMut UserSettingForwardingAddresseDeleteCall<'a, C, A> where C: Borrow } - let mut url = "https://www.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}".to_string(); + let mut url = self.hub._base_url.clone() + "{userId}/settings/forwardingAddresses/{forwardingEmail}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::SettingSharing.as_ref().to_string(), ()); } @@ -17836,4 +17860,3 @@ impl<'a, C, A> UserSettingForwardingAddresseDeleteCall<'a, C, A> where C: Borrow } - diff --git a/gen/groupsmigration1/src/lib.rs b/gen/groupsmigration1/src/lib.rs index 3779bed6ea..22bb7924a3 100644 --- a/gen/groupsmigration1/src/lib.rs +++ b/gen/groupsmigration1/src/lib.rs @@ -175,7 +175,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -301,6 +301,8 @@ pub struct GroupsMigration { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for GroupsMigration {} @@ -313,6 +315,8 @@ impl<'a, C, A> GroupsMigration client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/groups/v1/groups/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -329,6 +333,26 @@ impl<'a, C, A> GroupsMigration self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/groups/v1/groups/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -499,9 +523,9 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/groups/v1/groups/{groupId}/archive".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/groups/v1/groups/{groupId}/archive", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/groups/v1/groups/{groupId}/archive".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/groups/v1/groups/{groupId}/archive", "resumable") } else { unreachable!() }; @@ -769,4 +793,3 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/groupssettings1/src/lib.rs b/gen/groupssettings1/src/lib.rs index 644f456aac..b79837f714 100644 --- a/gen/groupssettings1/src/lib.rs +++ b/gen/groupssettings1/src/lib.rs @@ -178,7 +178,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -309,6 +309,8 @@ pub struct Groupssettings { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Groupssettings {} @@ -321,6 +323,8 @@ impl<'a, C, A> Groupssettings client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/groups/v1/groups/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -337,6 +341,26 @@ impl<'a, C, A> Groupssettings self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/groups/v1/groups/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -635,7 +659,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/groups/v1/groups/{groupUniqueId}".to_string(); + let mut url = self.hub._base_url.clone() + "{groupUniqueId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppGroupSetting.as_ref().to_string(), ()); } @@ -901,7 +925,7 @@ impl<'a, C, A> GroupPatchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/groups/v1/groups/{groupUniqueId}".to_string(); + let mut url = self.hub._base_url.clone() + "{groupUniqueId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppGroupSetting.as_ref().to_string(), ()); } @@ -1160,7 +1184,7 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/groups/v1/groups/{groupUniqueId}".to_string(); + let mut url = self.hub._base_url.clone() + "{groupUniqueId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppGroupSetting.as_ref().to_string(), ()); } @@ -1325,4 +1349,3 @@ impl<'a, C, A> GroupGetCall<'a, C, A> where C: BorrowMut, A: oaut } - diff --git a/gen/iam1/src/lib.rs b/gen/iam1/src/lib.rs index 0241553db3..f7ed7323a1 100644 --- a/gen/iam1/src/lib.rs +++ b/gen/iam1/src/lib.rs @@ -180,7 +180,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -311,6 +311,8 @@ pub struct Iam { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Iam {} @@ -323,6 +325,8 @@ impl<'a, C, A> Iam client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://iam.googleapis.com/".to_string(), + _root_url: "https://iam.googleapis.com/".to_string(), } } @@ -342,6 +346,26 @@ impl<'a, C, A> Iam self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://iam.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://iam.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1134,7 +1158,7 @@ impl<'a, C, A> RoleQueryGrantableRoleCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSetIamPolicyCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://iam.googleapis.com/v1/{+resource}:setIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:setIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1905,7 +1929,7 @@ impl<'a, C, A> ProjectServiceAccountKeyDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountSignBlobCall<'a, C, A> where C: BorrowMut ProjectServiceAccountUpdateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountListCall<'a, C, A> where C: BorrowMut ProjectServiceAccountDeleteCall<'a, C, A> where C: BorrowMut ProjectServiceAccountKeyGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetIamPolicyCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://iam.googleapis.com/v1/{+resource}:getIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:getIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4001,7 +4025,7 @@ impl<'a, C, A> ProjectServiceAccountTestIamPermissionCall<'a, C, A> where C: Bor params.push(("alt", "json".to_string())); - let mut url = "https://iam.googleapis.com/v1/{+resource}:testIamPermissions".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:testIamPermissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4277,7 +4301,7 @@ impl<'a, C, A> ProjectServiceAccountCreateCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut ProjectServiceAccountGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for IdentityToolkit {} @@ -323,6 +325,8 @@ impl<'a, C, A> IdentityToolkit client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -339,6 +343,26 @@ impl<'a, C, A> IdentityToolkit self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/identitytoolkit/v3/relyingparty/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2057,7 +2081,7 @@ impl<'a, C, A> RelyingpartyGetOobConfirmationCodeCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/getOobConfirmationCode".to_string(); + let mut url = self.hub._base_url.clone() + "getOobConfirmationCode"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2290,7 +2314,7 @@ impl<'a, C, A> RelyingpartySignupNewUserCall<'a, C, A> where C: BorrowMut RelyingpartyCreateAuthUriCall<'a, C, A> where C: BorrowMut RelyingpartySignOutUserCall<'a, C, A> where C: BorrowMut RelyingpartyVerifyAssertionCall<'a, C, A> where C: BorrowMut RelyingpartyUploadAccountCall<'a, C, A> where C: BorrowMut RelyingpartyGetAccountInfoCall<'a, C, A> where C: BorrowMut RelyingpartyVerifyCustomTokenCall<'a, C, A> where C: BorrowMut RelyingpartyResetPasswordCall<'a, C, A> where C: BorrowMut RelyingpartyDownloadAccountCall<'a, C, A> where C: BorrowMut RelyingpartySetAccountInfoCall<'a, C, A> where C: BorrowMut RelyingpartyDeleteAccountCall<'a, C, A> where C: BorrowMut RelyingpartyGetPublicKeyCall<'a, C, A> where C: BorrowMut RelyingpartyGetRecaptchaParamCall<'a, C, A> where C: BorrowMut RelyingpartyVerifyPasswordCall<'a, C, A> where C: BorrowMut RelyingpartySetProjectConfigCall<'a, C, A> where C: BorrowMut RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut RelyingpartyGetProjectConfigCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Kgsearch {} @@ -299,6 +301,8 @@ impl<'a, C, A> Kgsearch client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://kgsearch.googleapis.com/".to_string(), + _root_url: "https://kgsearch.googleapis.com/".to_string(), } } @@ -315,6 +319,26 @@ impl<'a, C, A> Kgsearch self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://kgsearch.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://kgsearch.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -523,7 +547,7 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://kgsearch.googleapis.com/v1/entities:search".to_string(); + let mut url = self.hub._base_url.clone() + "v1/entities:search"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -694,4 +718,3 @@ impl<'a, C, A> EntitySearchCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/licensing1/src/lib.rs b/gen/licensing1/src/lib.rs index 81b3f6603b..1303ce168a 100644 --- a/gen/licensing1/src/lib.rs +++ b/gen/licensing1/src/lib.rs @@ -178,7 +178,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -305,6 +305,8 @@ pub struct Licensing { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Licensing {} @@ -317,6 +319,8 @@ impl<'a, C, A> Licensing client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/apps/licensing/v1/product/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -333,6 +337,26 @@ impl<'a, C, A> Licensing self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/apps/licensing/v1/product/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -702,7 +726,7 @@ impl<'a, C, A> LicenseAssignmentDeleteCall<'a, C, A> where C: BorrowMut LicenseAssignmentListForProductCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/licensing/v1/product/{productId}/users".to_string(); + let mut url = self.hub._base_url.clone() + "{productId}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppLicensing.as_ref().to_string(), ()); } @@ -1222,7 +1246,7 @@ impl<'a, C, A> LicenseAssignmentGetCall<'a, C, A> where C: BorrowMut LicenseAssignmentListForProductAndSkuCall<'a, C, A> where C: Borr params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/users".to_string(); + let mut url = self.hub._base_url.clone() + "{productId}/sku/{skuId}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppLicensing.as_ref().to_string(), ()); } @@ -1771,7 +1795,7 @@ impl<'a, C, A> LicenseAssignmentUpdateCall<'a, C, A> where C: BorrowMut LicenseAssignmentPatchCall<'a, C, A> where C: BorrowMut LicenseAssignmentInsertCall<'a, C, A> where C: BorrowMut LicenseAssignmentInsertCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Logging {} @@ -358,6 +360,8 @@ impl<'a, C, A> Logging client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://logging.googleapis.com/".to_string(), + _root_url: "https://logging.googleapis.com/".to_string(), } } @@ -389,6 +393,26 @@ impl<'a, C, A> Logging self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://logging.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://logging.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1976,7 +2000,7 @@ impl<'a, C, A> FolderSinkListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2247,7 +2271,7 @@ impl<'a, C, A> FolderSinkUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2529,7 +2553,7 @@ impl<'a, C, A> FolderSinkGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2789,7 +2813,7 @@ impl<'a, C, A> FolderSinkCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3068,7 +3092,7 @@ impl<'a, C, A> FolderSinkDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3326,7 +3350,7 @@ impl<'a, C, A> FolderLogListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/logs".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/logs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3588,7 +3612,7 @@ impl<'a, C, A> FolderLogDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+logName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+logName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3846,7 +3870,7 @@ impl<'a, C, A> OrganizationLogListCall<'a, C, A> where C: BorrowMut OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationSinkUpdateCall<'a, C, A> where C: BorrowMut OrganizationSinkGetCall<'a, C, A> where C: BorrowMut OrganizationSinkListCall<'a, C, A> where C: BorrowMut OrganizationSinkDeleteCall<'a, C, A> where C: BorrowMut OrganizationSinkCreateCall<'a, C, A> where C: BorrowMut EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/entries:write".to_string(); + let mut url = self.hub._base_url.clone() + "v2/entries:write"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5949,7 +5973,7 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/entries:list".to_string(); + let mut url = self.hub._base_url.clone() + "v2/entries:list"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6196,7 +6220,7 @@ impl<'a, C, A> BillingAccountSinkCreateCall<'a, C, A> where C: BorrowMut BillingAccountLogListCall<'a, C, A> where C: BorrowMut BillingAccountSinkListCall<'a, C, A> where C: BorrowMut BillingAccountSinkDeleteCall<'a, C, A> where C: BorrowMut BillingAccountSinkGetCall<'a, C, A> where C: BorrowMut BillingAccountSinkUpdateCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/monitoredResourceDescriptors".to_string(); + let mut url = self.hub._base_url.clone() + "v2/monitoredResourceDescriptors"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8286,7 +8310,7 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+logName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+logName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8534,7 +8558,7 @@ impl<'a, C, A> ProjectMetricGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+metricName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+metricName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8791,7 +8815,7 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/logs".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/logs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9060,7 +9084,7 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut ProjectMetricListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/metrics".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/metrics"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9614,7 +9638,7 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9906,7 +9930,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10165,7 +10189,7 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10413,7 +10437,7 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10673,7 +10697,7 @@ impl<'a, C, A> ProjectSinkCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10959,7 +10983,7 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Logging {} @@ -335,6 +337,8 @@ impl<'a, C, A> Logging client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://logging.googleapis.com/".to_string(), + _root_url: "https://logging.googleapis.com/".to_string(), } } @@ -363,6 +367,26 @@ impl<'a, C, A> Logging self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://logging.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://logging.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1525,7 +1549,7 @@ impl<'a, C, A> OrganizationLogDeleteCall<'a, C, A> where C: BorrowMut OrganizationLogListCall<'a, C, A> where C: BorrowMut BillingAccountLogDeleteCall<'a, C, A> where C: BorrowMut BillingAccountLogListCall<'a, C, A> where C: BorrowMut MonitoredResourceDescriptorListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/monitoredResourceDescriptors".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/monitoredResourceDescriptors"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2807,7 +2831,7 @@ impl<'a, C, A> ProjectSinkListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3066,7 +3090,7 @@ impl<'a, C, A> ProjectLogDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+logName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+logName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3314,7 +3338,7 @@ impl<'a, C, A> ProjectSinkGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3569,7 +3593,7 @@ impl<'a, C, A> ProjectMetricUpdateCall<'a, C, A> where C: BorrowMut ProjectMetricGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+metricName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+metricName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4099,7 +4123,7 @@ impl<'a, C, A> ProjectSinkUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4391,7 +4415,7 @@ impl<'a, C, A> ProjectLogListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/logs".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+parent}/logs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4653,7 +4677,7 @@ impl<'a, C, A> ProjectMetricDeleteCall<'a, C, A> where C: BorrowMut ProjectSinkCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/sinks".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+parent}/sinks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5198,7 +5222,7 @@ impl<'a, C, A> ProjectMetricCreateCall<'a, C, A> where C: BorrowMut ProjectMetricListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+parent}/metrics".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+parent}/metrics"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5740,7 +5764,7 @@ impl<'a, C, A> ProjectSinkDeleteCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/{+sinkName}".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/{+sinkName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5992,7 +6016,7 @@ impl<'a, C, A> EntryListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/entries:list".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/entries:list"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6231,7 +6255,7 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://logging.googleapis.com/v2beta1/entries:write".to_string(); + let mut url = self.hub._base_url.clone() + "v2beta1/entries:write"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6395,4 +6419,3 @@ impl<'a, C, A> EntryWriteCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/manager1_beta2/src/lib.rs b/gen/manager1_beta2/src/lib.rs index 5b18170ef5..3e7c61d276 100644 --- a/gen/manager1_beta2/src/lib.rs +++ b/gen/manager1_beta2/src/lib.rs @@ -177,7 +177,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -328,6 +328,8 @@ pub struct Manager { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Manager {} @@ -340,6 +342,8 @@ impl<'a, C, A> Manager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/manager/v1beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -359,6 +363,26 @@ impl<'a, C, A> Manager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/manager/v1beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1446,7 +1470,7 @@ impl<'a, C, A> TemplateListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/templates".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/templates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -1695,7 +1719,7 @@ impl<'a, C, A> TemplateDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/templates/{templateName}".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/templates/{templateName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1935,7 +1959,7 @@ impl<'a, C, A> TemplateInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/templates".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/templates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2195,7 +2219,7 @@ impl<'a, C, A> TemplateGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/templates/{templateName}".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/templates/{templateName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2447,7 +2471,7 @@ impl<'a, C, A> DeploymentInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/regions/{region}/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/regions/{region}/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppengineAdmin.as_ref().to_string(), ()); } @@ -2718,7 +2742,7 @@ impl<'a, C, A> DeploymentGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/regions/{region}/deployments/{deploymentName}".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/regions/{region}/deployments/{deploymentName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -2982,7 +3006,7 @@ impl<'a, C, A> DeploymentListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/regions/{region}/deployments".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/regions/{region}/deployments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -3242,7 +3266,7 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/manager/v1beta2/projects/{projectId}/regions/{region}/deployments/{deploymentName}".to_string(); + let mut url = self.hub._base_url.clone() + "{projectId}/regions/{region}/deployments/{deploymentName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3414,4 +3438,3 @@ impl<'a, C, A> DeploymentDeleteCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/manufacturers1/src/lib.rs b/gen/manufacturers1/src/lib.rs index 096ac63632..cf0ec5533b 100644 --- a/gen/manufacturers1/src/lib.rs +++ b/gen/manufacturers1/src/lib.rs @@ -170,7 +170,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -295,6 +295,8 @@ pub struct ManufacturerCenter { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for ManufacturerCenter {} @@ -307,6 +309,8 @@ impl<'a, C, A> ManufacturerCenter client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://manufacturers.googleapis.com/".to_string(), + _root_url: "https://manufacturers.googleapis.com/".to_string(), } } @@ -323,6 +327,26 @@ impl<'a, C, A> ManufacturerCenter self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://manufacturers.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://manufacturers.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -666,7 +690,7 @@ impl<'a, C, A> AccountProductListCall<'a, C, A> where C: BorrowMut AccountProductGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://manufacturers.googleapis.com/v1/{+parent}/products/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+parent}/products/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Manufacturercenter.as_ref().to_string(), ()); } @@ -1126,4 +1150,3 @@ impl<'a, C, A> AccountProductGetCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/mirror1/src/lib.rs b/gen/mirror1/src/lib.rs index ca8c43d2de..3df2aa5436 100644 --- a/gen/mirror1/src/lib.rs +++ b/gen/mirror1/src/lib.rs @@ -201,7 +201,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -336,6 +336,8 @@ pub struct Mirror { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Mirror {} @@ -348,6 +350,8 @@ impl<'a, C, A> Mirror client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/mirror/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -379,6 +383,26 @@ impl<'a, C, A> Mirror self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/mirror/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1758,7 +1782,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionUpdateCall<'a, C, A> where C: BorrowMut SubscriptionListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/subscriptions".to_string(); + let mut url = self.hub._base_url.clone() + "subscriptions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -2678,7 +2702,7 @@ impl<'a, C, A> TimelineAttachmentListCall<'a, C, A> where C: BorrowMut TimelineInsertCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/mirror/v1/timeline".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/mirror/v1/timeline", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/mirror/v1/timeline".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/mirror/v1/timeline", "resumable") } else { unreachable!() }; @@ -3267,7 +3291,7 @@ impl<'a, C, A> TimelinePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/timeline/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "timeline/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -3559,7 +3583,7 @@ impl<'a, C, A> TimelineListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/timeline".to_string(); + let mut url = self.hub._base_url.clone() + "timeline"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -3816,9 +3840,9 @@ impl<'a, C, A> TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut TimelineAttachmentDeleteCall<'a, C, A> where C: BorrowMut TimelineDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/mirror/v1/timeline/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "timeline/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -4627,9 +4651,9 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/mirror/v1/timeline/{id}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/mirror/v1/timeline/{id}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/mirror/v1/timeline/{id}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/mirror/v1/timeline/{id}", "resumable") } else { unreachable!() }; @@ -5019,7 +5043,7 @@ impl<'a, C, A> TimelineAttachmentGetCall<'a, C, A> where C: BorrowMut TimelineGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/timeline/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "timeline/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -5499,7 +5523,7 @@ impl<'a, C, A> SettingGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/settings/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "settings/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -5736,7 +5760,7 @@ impl<'a, C, A> LocationGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/locations/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "locations/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -5969,7 +5993,7 @@ impl<'a, C, A> LocationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/locations".to_string(); + let mut url = self.hub._base_url.clone() + "locations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasLocation.as_ref().to_string(), ()); } @@ -6183,7 +6207,7 @@ impl<'a, C, A> AccountInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/accounts/{userToken}/{accountType}/{accountName}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{userToken}/{accountType}/{accountName}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -6441,7 +6465,7 @@ impl<'a, C, A> ContactGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/contacts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "contacts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -6675,7 +6699,7 @@ impl<'a, C, A> ContactDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/mirror/v1/contacts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "contacts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -6905,7 +6929,7 @@ impl<'a, C, A> ContactInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/contacts".to_string(); + let mut url = self.hub._base_url.clone() + "contacts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -7140,7 +7164,7 @@ impl<'a, C, A> ContactPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/contacts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "contacts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -7397,7 +7421,7 @@ impl<'a, C, A> ContactListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/contacts".to_string(); + let mut url = self.hub._base_url.clone() + "contacts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -7608,7 +7632,7 @@ impl<'a, C, A> ContactUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/mirror/v1/contacts/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "contacts/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::GlasTimeline.as_ref().to_string(), ()); } @@ -7797,4 +7821,3 @@ impl<'a, C, A> ContactUpdateCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/ml1_beta1/src/lib.rs b/gen/ml1_beta1/src/lib.rs index ae64622c15..3b8ae91492 100644 --- a/gen/ml1_beta1/src/lib.rs +++ b/gen/ml1_beta1/src/lib.rs @@ -179,7 +179,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -310,6 +310,8 @@ pub struct CloudMachineLearning { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for CloudMachineLearning {} @@ -322,6 +324,8 @@ impl<'a, C, A> CloudMachineLearning client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://ml.googleapis.com/".to_string(), + _root_url: "https://ml.googleapis.com/".to_string(), } } @@ -338,6 +342,26 @@ impl<'a, C, A> CloudMachineLearning self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://ml.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://ml.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1846,7 +1870,7 @@ impl<'a, C, A> ProjectOperationListCall<'a, C, A> where C: BorrowMut ProjectOperationDeleteCall<'a, C, A> where C: BorrowMut ProjectModelVersionCreateCall<'a, C, A> where C: BorrowMut ProjectModelVersionListCall<'a, C, A> where C: BorrowMut ProjectOperationGetCall<'a, C, A> where C: BorrowMut ProjectModelVersionDeleteCall<'a, C, A> where C: BorrowMut ProjectJobCreateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+parent}/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+parent}/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3721,7 +3745,7 @@ impl<'a, C, A> ProjectModelVersionSetDefaultCall<'a, C, A> where C: BorrowMut ProjectPredictCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+name}:predict".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}:predict"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4322,7 +4346,7 @@ impl<'a, C, A> ProjectModelDeleteCall<'a, C, A> where C: BorrowMut ProjectGetConfigCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+name}:getConfig".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}:getConfig"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4819,7 +4843,7 @@ impl<'a, C, A> ProjectJobGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5075,7 +5099,7 @@ impl<'a, C, A> ProjectOperationCancelCall<'a, C, A> where C: BorrowMut ProjectModelCreateCall<'a, C, A> where C: BorrowMut ProjectModelVersionGetCall<'a, C, A> where C: BorrowMut ProjectJobListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+parent}/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+parent}/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6151,7 +6175,7 @@ impl<'a, C, A> ProjectJobCancelCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+name}:cancel".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}:cancel"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6424,7 +6448,7 @@ impl<'a, C, A> ProjectModelGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6684,7 +6708,7 @@ impl<'a, C, A> ProjectModelListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://ml.googleapis.com/v1beta1/{+parent}/models".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+parent}/models"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6881,4 +6905,3 @@ impl<'a, C, A> ProjectModelListCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/monitoring3/src/lib.rs b/gen/monitoring3/src/lib.rs index 8e121084a7..273b61a0cb 100644 --- a/gen/monitoring3/src/lib.rs +++ b/gen/monitoring3/src/lib.rs @@ -179,7 +179,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -322,6 +322,8 @@ pub struct Monitoring { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Monitoring {} @@ -334,6 +336,8 @@ impl<'a, C, A> Monitoring client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://monitoring.googleapis.com/".to_string(), + _root_url: "https://monitoring.googleapis.com/".to_string(), } } @@ -350,6 +354,26 @@ impl<'a, C, A> Monitoring self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://monitoring.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://monitoring.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1390,7 +1414,7 @@ impl<'a, C, A> ProjectMetricDescriptorGetCall<'a, C, A> where C: BorrowMut ProjectGroupCreateCall<'a, C, A> where C: BorrowMut ProjectGroupGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v3/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2168,7 +2192,7 @@ impl<'a, C, A> ProjectMetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut ProjectCollectdTimeSeryCreateCall<'a, C, A> where C: BorrowMut ProjectGroupMemberListCall<'a, C, A> where C: BorrowMut ProjectMonitoredResourceDescriptorListCall<'a, C, A> where C: Bor params.push(("alt", "json".to_string())); - let mut url = "https://monitoring.googleapis.com/v3/{+name}/monitoredResourceDescriptors".to_string(); + let mut url = self.hub._base_url.clone() + "v3/{+name}/monitoredResourceDescriptors"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3286,7 +3310,7 @@ impl<'a, C, A> ProjectTimeSeryCreateCall<'a, C, A> where C: BorrowMut ProjectMetricDescriptorCreateCall<'a, C, A> where C: BorrowMut ProjectGroupListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://monitoring.googleapis.com/v3/{+name}/groups".to_string(); + let mut url = self.hub._base_url.clone() + "v3/{+name}/groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4151,7 +4175,7 @@ impl<'a, C, A> ProjectMetricDescriptorListCall<'a, C, A> where C: BorrowMut ProjectMonitoredResourceDescriptorGetCall<'a, C, A> where C: Borr params.push(("alt", "json".to_string())); - let mut url = "https://monitoring.googleapis.com/v3/{+name}".to_string(); + let mut url = self.hub._base_url.clone() + "v3/{+name}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4676,7 +4700,7 @@ impl<'a, C, A> ProjectGroupUpdateCall<'a, C, A> where C: BorrowMut ProjectGroupDeleteCall<'a, C, A> where C: BorrowMut ProjectTimeSeryListCall<'a, C, A> where C: BorrowMut ProjectTimeSeryListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Pagespeedonline {} @@ -295,6 +297,8 @@ impl<'a, C, A> Pagespeedonline client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/pagespeedonline/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -311,6 +315,26 @@ impl<'a, C, A> Pagespeedonline self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/pagespeedonline/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -803,7 +827,7 @@ impl<'a, C, A> PagespeedapiRunpagespeedCall<'a, C, A> where C: BorrowMut PagespeedapiRunpagespeedCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Partners {} @@ -303,6 +305,8 @@ impl<'a, C, A> Partners client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://partners.googleapis.com/".to_string(), + _root_url: "https://partners.googleapis.com/".to_string(), } } @@ -328,6 +332,26 @@ impl<'a, C, A> Partners self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://partners.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://partners.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1274,7 +1298,7 @@ impl<'a, C, A> UserEventLogCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/userEvents:log".to_string(); + let mut url = self.hub._base_url.clone() + "v2/userEvents:log"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1491,7 +1515,7 @@ impl<'a, C, A> ClientMessageLogCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/clientMessages:log".to_string(); + let mut url = self.hub._base_url.clone() + "v2/clientMessages:log"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1760,7 +1784,7 @@ impl<'a, C, A> CompanyGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/companies/{companyId}".to_string(); + let mut url = self.hub._base_url.clone() + "v2/companies/{companyId}"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2064,7 +2088,7 @@ impl<'a, C, A> CompanyLeadCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/companies/{companyId}/leads".to_string(); + let mut url = self.hub._base_url.clone() + "v2/companies/{companyId}/leads"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2435,7 +2459,7 @@ impl<'a, C, A> CompanyListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/companies".to_string(); + let mut url = self.hub._base_url.clone() + "v2/companies"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2831,7 +2855,7 @@ impl<'a, C, A> UserStateListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://partners.googleapis.com/v2/userStates".to_string(); + let mut url = self.hub._base_url.clone() + "v2/userStates"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -3000,4 +3024,3 @@ impl<'a, C, A> UserStateListCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/people1/src/lib.rs b/gen/people1/src/lib.rs index 8f1acb8a2c..32e352bac2 100644 --- a/gen/people1/src/lib.rs +++ b/gen/people1/src/lib.rs @@ -171,7 +171,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -329,6 +329,8 @@ pub struct People { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for People {} @@ -341,6 +343,8 @@ impl<'a, C, A> People client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://people.googleapis.com/".to_string(), + _root_url: "https://people.googleapis.com/".to_string(), } } @@ -357,6 +361,26 @@ impl<'a, C, A> People self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://people.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://people.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1318,7 +1342,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://people.googleapis.com/v1/{+resourceName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resourceName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ContactReadonly.as_ref().to_string(), ()); } @@ -1595,7 +1619,7 @@ impl<'a, C, A> PeopleConnectionListCall<'a, C, A> where C: BorrowMut PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://people.googleapis.com/v1/people:batchGet".to_string(); + let mut url = self.hub._base_url.clone() + "v1/people:batchGet"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ContactReadonly.as_ref().to_string(), ()); } @@ -2039,4 +2063,3 @@ impl<'a, C, A> PeopleGetBatchGetCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/playmoviespartner1/src/lib.rs b/gen/playmoviespartner1/src/lib.rs index eac28886bd..95af45ae1c 100644 --- a/gen/playmoviespartner1/src/lib.rs +++ b/gen/playmoviespartner1/src/lib.rs @@ -170,7 +170,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -295,6 +295,8 @@ pub struct PlayMovies { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for PlayMovies {} @@ -307,6 +309,8 @@ impl<'a, C, A> PlayMovies client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://playmoviespartner.googleapis.com/".to_string(), + _root_url: "https://playmoviespartner.googleapis.com/".to_string(), } } @@ -323,6 +327,26 @@ impl<'a, C, A> PlayMovies self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://playmoviespartner.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://playmoviespartner.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1292,7 +1316,7 @@ impl<'a, C, A> AccountOrderListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/orders".to_string(); + let mut url = self.hub._base_url.clone() + "v1/accounts/{accountId}/orders"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); } @@ -1597,7 +1621,7 @@ impl<'a, C, A> AccountStoreInfoCountryGetCall<'a, C, A> where C: BorrowMut AccountOrderGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/orders/{orderId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/accounts/{accountId}/orders/{orderId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); } @@ -2113,7 +2137,7 @@ impl<'a, C, A> AccountAvailGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/avails/{availId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/accounts/{accountId}/avails/{availId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); } @@ -2419,7 +2443,7 @@ impl<'a, C, A> AccountAvailListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://playmoviespartner.googleapis.com/v1/accounts/{accountId}/avails".to_string(); + let mut url = self.hub._base_url.clone() + "v1/accounts/{accountId}/avails"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PlaymovyPartnerReadonly.as_ref().to_string(), ()); } @@ -2730,7 +2754,7 @@ impl<'a, C, A> AccountExperienceLocaleGetCall<'a, C, A> where C: BorrowMut AccountStoreInfoListCall<'a, C, A> where C: BorrowMut AccountExperienceLocaleListCall<'a, C, A> where C: BorrowMut AccountComponentListCall<'a, C, A> where C: BorrowMut AccountComponentTypeGetCall<'a, C, A> where C: BorrowMut AccountComponentTypeGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Plus {} @@ -331,6 +333,8 @@ impl<'a, C, A> Plus client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/plus/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -353,6 +357,26 @@ impl<'a, C, A> Plus self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/plus/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1949,7 +1973,7 @@ impl<'a, C, A> ActivitySearchCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/activities".to_string(); + let mut url = self.hub._base_url.clone() + "activities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -2191,7 +2215,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/activities/{activityId}".to_string(); + let mut url = self.hub._base_url.clone() + "activities/{activityId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -2438,7 +2462,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/people/{userId}/activities/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/activities/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -2712,7 +2736,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/activities/{activityId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "activities/{activityId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -2968,7 +2992,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -3218,7 +3242,7 @@ impl<'a, C, A> PeopleSearchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/people".to_string(); + let mut url = self.hub._base_url.clone() + "people"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -3465,7 +3489,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut PeopleListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/people/{userId}/people/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/people/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -4007,7 +4031,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plus/v1/people/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Login.as_ref().to_string(), ()); } @@ -4172,4 +4196,3 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau } - diff --git a/gen/plusdomains1/src/lib.rs b/gen/plusdomains1/src/lib.rs index 7a9c40fb6b..8aa3b58ee9 100644 --- a/gen/plusdomains1/src/lib.rs +++ b/gen/plusdomains1/src/lib.rs @@ -193,7 +193,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -356,6 +356,8 @@ pub struct PlusDomains { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for PlusDomains {} @@ -368,6 +370,8 @@ impl<'a, C, A> PlusDomains client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/plusDomains/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -399,6 +403,26 @@ impl<'a, C, A> PlusDomains self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/plusDomains/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2627,7 +2651,7 @@ impl<'a, C, A> CircleRemovePeopleCall<'a, C, A> where C: BorrowMut CircleInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/circles".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/circles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleWrite.as_ref().to_string(), ()); } @@ -3148,7 +3172,7 @@ impl<'a, C, A> CircleAddPeopleCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/circles/{circleId}/people".to_string(); + let mut url = self.hub._base_url.clone() + "circles/{circleId}/people"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleWrite.as_ref().to_string(), ()); } @@ -3399,7 +3423,7 @@ impl<'a, C, A> CircleGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/circles/{circleId}".to_string(); + let mut url = self.hub._base_url.clone() + "circles/{circleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleRead.as_ref().to_string(), ()); } @@ -3644,7 +3668,7 @@ impl<'a, C, A> CircleListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/circles".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/circles"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleRead.as_ref().to_string(), ()); } @@ -3900,7 +3924,7 @@ impl<'a, C, A> CircleUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/circles/{circleId}".to_string(); + let mut url = self.hub._base_url.clone() + "circles/{circleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleWrite.as_ref().to_string(), ()); } @@ -4166,7 +4190,7 @@ impl<'a, C, A> CirclePatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/circles/{circleId}".to_string(); + let mut url = self.hub._base_url.clone() + "circles/{circleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleWrite.as_ref().to_string(), ()); } @@ -4424,7 +4448,7 @@ impl<'a, C, A> CircleRemoveCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/plusDomains/v1/circles/{circleId}".to_string(); + let mut url = self.hub._base_url.clone() + "circles/{circleId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleWrite.as_ref().to_string(), ()); } @@ -4661,7 +4685,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/activities".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/activities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -4927,7 +4951,7 @@ impl<'a, C, A> ActivityGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/activities/{activityId}".to_string(); + let mut url = self.hub._base_url.clone() + "activities/{activityId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -5174,7 +5198,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/activities/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/activities/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -5443,7 +5467,7 @@ impl<'a, C, A> PeopleListByCircleCall<'a, C, A> where C: BorrowMut PeopleListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/people/{collection}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/people/{collection}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleRead.as_ref().to_string(), ()); } @@ -5975,7 +5999,7 @@ impl<'a, C, A> PeopleGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -6222,7 +6246,7 @@ impl<'a, C, A> PeopleListByActivityCall<'a, C, A> where C: BorrowMut MediaInsertCall<'a, C, A> where C: BorrowMut, A: o let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/plusDomains/v1/people/{userId}/media/{collection}".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/plusDomains/v1/people/{userId}/media/{collection}", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/plusDomains/v1/people/{userId}/media/{collection}", "resumable") } else { unreachable!() }; @@ -6875,7 +6899,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/activities/{activityId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "activities/{activityId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -7149,7 +7173,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/activities/{activityId}/comments".to_string(); + let mut url = self.hub._base_url.clone() + "activities/{activityId}/comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -7405,7 +7429,7 @@ impl<'a, C, A> CommentGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/comments/{commentId}".to_string(); + let mut url = self.hub._base_url.clone() + "comments/{commentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluLogin.as_ref().to_string(), ()); } @@ -7650,7 +7674,7 @@ impl<'a, C, A> AudienceListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/plusDomains/v1/people/{userId}/audiences".to_string(); + let mut url = self.hub._base_url.clone() + "people/{userId}/audiences"; if self._scopes.len() == 0 { self._scopes.insert(Scope::PluCircleRead.as_ref().to_string(), ()); } @@ -7829,4 +7853,3 @@ impl<'a, C, A> AudienceListCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/prediction1d6/src/lib.rs b/gen/prediction1d6/src/lib.rs index 9c37164ef4..6859cd5c9f 100644 --- a/gen/prediction1d6/src/lib.rs +++ b/gen/prediction1d6/src/lib.rs @@ -180,7 +180,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -327,6 +327,8 @@ pub struct Prediction { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Prediction {} @@ -339,6 +341,8 @@ impl<'a, C, A> Prediction client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/prediction/v1.6/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -358,6 +362,26 @@ impl<'a, C, A> Prediction self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/prediction/v1.6/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1152,7 +1176,7 @@ impl<'a, C, A> TrainedmodelGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/trainedmodels/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1406,7 +1430,7 @@ impl<'a, C, A> TrainedmodelUpdateCall<'a, C, A> where C: BorrowMut TrainedmodelListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/prediction/v1.6/projects/{project}/trainedmodels/list".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/trainedmodels/list"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1935,7 +1959,7 @@ impl<'a, C, A> TrainedmodelDeleteCall<'a, C, A> where C: BorrowMut TrainedmodelInsertCall<'a, C, A> where C: BorrowMut TrainedmodelAnalyzeCall<'a, C, A> where C: BorrowMut TrainedmodelPredictCall<'a, C, A> where C: BorrowMut HostedmodelPredictCall<'a, C, A> where C: BorrowMut HostedmodelPredictCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Proximitybeacon {} @@ -333,6 +335,8 @@ impl<'a, C, A> Proximitybeacon client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://proximitybeacon.googleapis.com/".to_string(), + _root_url: "https://proximitybeacon.googleapis.com/".to_string(), } } @@ -358,6 +362,26 @@ impl<'a, C, A> Proximitybeacon self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://proximitybeacon.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://proximitybeacon.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1360,7 +1384,7 @@ impl<'a, C, A> BeaconAttachmentListCall<'a, C, A> where C: BorrowMut BeaconGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+beaconName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+beaconName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -1890,7 +1914,7 @@ impl<'a, C, A> BeaconAttachmentCreateCall<'a, C, A> where C: BorrowMut BeaconDecommissionCall<'a, C, A> where C: BorrowMut BeaconActivateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+beaconName}:activate".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+beaconName}:activate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -2697,7 +2721,7 @@ impl<'a, C, A> BeaconListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/beacons".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/beacons"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -2948,7 +2972,7 @@ impl<'a, C, A> BeaconUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+beaconName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+beaconName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -3229,7 +3253,7 @@ impl<'a, C, A> BeaconAttachmentDeleteCall<'a, C, A> where C: BorrowMut BeaconDeactivateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+beaconName}:deactivate".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+beaconName}:deactivate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -3747,7 +3771,7 @@ impl<'a, C, A> BeaconRegisterCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/beacons:register".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/beacons:register"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -4009,7 +4033,7 @@ impl<'a, C, A> BeaconDiagnosticListCall<'a, C, A> where C: BorrowMut BeaconAttachmentBatchDeleteCall<'a, C, A> where C: BorrowMut BeaconinfoGetforobservedCall<'a, C, A> where C: BorrowMut MethodGetEidparamCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/eidparams".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/eidparams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -4978,7 +5002,7 @@ impl<'a, C, A> NamespaceListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/namespaces".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/namespaces"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -5208,7 +5232,7 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://proximitybeacon.googleapis.com/v1beta1/{+namespaceName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta1/{+namespaceName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::UserlocationBeaconRegistry.as_ref().to_string(), ()); } @@ -5413,4 +5437,3 @@ impl<'a, C, A> NamespaceUpdateCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/pubsub1/src/lib.rs b/gen/pubsub1/src/lib.rs index e8bad9c3bb..95c4959299 100644 --- a/gen/pubsub1/src/lib.rs +++ b/gen/pubsub1/src/lib.rs @@ -181,7 +181,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -316,6 +316,8 @@ pub struct Pubsub { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Pubsub {} @@ -328,6 +330,8 @@ impl<'a, C, A> Pubsub client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://pubsub.googleapis.com/".to_string(), + _root_url: "https://pubsub.googleapis.com/".to_string(), } } @@ -344,6 +348,26 @@ impl<'a, C, A> Pubsub self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://pubsub.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://pubsub.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1581,7 +1605,7 @@ impl<'a, C, A> ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+resource}:testIamPermissions".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:testIamPermissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2687,7 +2711,7 @@ impl<'a, C, A> ProjectSnapshotTestIamPermissionCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+resource}:testIamPermissions".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:testIamPermissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2968,7 +2992,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+subscription}:modifyPushConfig".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+subscription}:modifyPushConfig"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3522,7 +3546,7 @@ impl<'a, C, A> ProjectSnapshotGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+subscription}:modifyAckDeadline".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+subscription}:modifyAckDeadline"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4052,7 +4076,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+resource}:getIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:getIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5091,7 +5115,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+project}/topics".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+project}/topics"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5362,7 +5386,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut ProjectTopicGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+topic}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+topic}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5886,7 +5910,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut ProjectSnapshotSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1/{+resource}:setIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+resource}:setIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7702,4 +7726,3 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< } - diff --git a/gen/pubsub1_beta2/src/lib.rs b/gen/pubsub1_beta2/src/lib.rs index 726a88e00d..41f44a2b38 100644 --- a/gen/pubsub1_beta2/src/lib.rs +++ b/gen/pubsub1_beta2/src/lib.rs @@ -180,7 +180,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -315,6 +315,8 @@ pub struct Pubsub { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Pubsub {} @@ -327,6 +329,8 @@ impl<'a, C, A> Pubsub client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://pubsub.googleapis.com/".to_string(), + _root_url: "https://pubsub.googleapis.com/".to_string(), } } @@ -343,6 +347,26 @@ impl<'a, C, A> Pubsub self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://pubsub.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://pubsub.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1499,7 +1523,7 @@ impl<'a, C, A> ProjectTopicListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+project}/topics".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+project}/topics"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1770,7 +1794,7 @@ impl<'a, C, A> ProjectSubscriptionPullCall<'a, C, A> where C: BorrowMut ProjectTopicCreateCall<'a, C, A> where C: BorrowMut ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyPushConfigCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+subscription}:modifyPushConfig".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+subscription}:modifyPushConfig"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2888,7 +2912,7 @@ impl<'a, C, A> ProjectTopicPublishCall<'a, C, A> where C: BorrowMut ProjectTopicGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+topic}".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+topic}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3404,7 +3428,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionModifyAckDeadlineCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+subscription}:modifyAckDeadline".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+subscription}:modifyAckDeadline"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3935,7 +3959,7 @@ impl<'a, C, A> ProjectSubscriptionDeleteCall<'a, C, A> where C: BorrowMut ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+resource}:getIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+resource}:getIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5284,7 +5308,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+resource}:testIamPermissions".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+resource}:testIamPermissions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5559,7 +5583,7 @@ impl<'a, C, A> ProjectTopicDeleteCall<'a, C, A> where C: BorrowMut ProjectSubscriptionGetCall<'a, C, A> where C: BorrowMut ProjectTopicSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionListCall<'a, C, A> where C: BorrowMut ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://pubsub.googleapis.com/v1beta2/{+resource}:setIamPolicy".to_string(); + let mut url = self.hub._base_url.clone() + "v1beta2/{+resource}:setIamPolicy"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6799,4 +6823,3 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut< } - diff --git a/gen/qpxexpress1/src/lib.rs b/gen/qpxexpress1/src/lib.rs index 13b7f14447..72d52958fb 100644 --- a/gen/qpxexpress1/src/lib.rs +++ b/gen/qpxexpress1/src/lib.rs @@ -176,7 +176,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -285,6 +285,8 @@ pub struct QPXExpress { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for QPXExpress {} @@ -297,6 +299,8 @@ impl<'a, C, A> QPXExpress client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/qpxExpress/v1/trips/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -313,6 +317,26 @@ impl<'a, C, A> QPXExpress self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/qpxExpress/v1/trips/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1057,7 +1081,7 @@ impl<'a, C, A> TripSearchCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/qpxExpress/v1/trips/search".to_string(); + let mut url = self.hub._base_url.clone() + "search"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1194,4 +1218,3 @@ impl<'a, C, A> TripSearchCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/replicapool1_beta2/src/lib.rs b/gen/replicapool1_beta2/src/lib.rs index ff7a31de19..d10fc45cf8 100644 --- a/gen/replicapool1_beta2/src/lib.rs +++ b/gen/replicapool1_beta2/src/lib.rs @@ -184,7 +184,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -324,6 +324,8 @@ pub struct Replicapool { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Replicapool {} @@ -336,6 +338,8 @@ impl<'a, C, A> Replicapool client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/replicapool/v1beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -355,6 +359,26 @@ impl<'a, C, A> Replicapool self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/replicapool/v1beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1189,7 +1213,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1459,7 +1483,7 @@ impl<'a, C, A> ZoneOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1725,7 +1749,7 @@ impl<'a, C, A> InstanceGroupManagerSetTargetPoolCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2021,7 +2045,7 @@ impl<'a, C, A> InstanceGroupManagerListCall<'a, C, A> where C: BorrowMut InstanceGroupManagerInsertCall<'a, C, A> where C: BorrowMut InstanceGroupManagerGetCall<'a, C, A> where C: BorrowMut InstanceGroupManagerAbandonInstanceCall<'a, C, A> where C: Borrow params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3137,7 +3161,7 @@ impl<'a, C, A> InstanceGroupManagerRecreateInstanceCall<'a, C, A> where C: Borro params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3420,7 +3444,7 @@ impl<'a, C, A> InstanceGroupManagerDeleteCall<'a, C, A> where C: BorrowMut InstanceGroupManagerSetInstanceTemplateCall<'a, C, A> where C: Bo params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3971,7 +3995,7 @@ impl<'a, C, A> InstanceGroupManagerResizeCall<'a, C, A> where C: BorrowMut InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapool/v1beta2/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4456,4 +4480,3 @@ impl<'a, C, A> InstanceGroupManagerDeleteInstanceCall<'a, C, A> where C: BorrowM } - diff --git a/gen/replicapoolupdater1_beta1/src/lib.rs b/gen/replicapoolupdater1_beta1/src/lib.rs index 5568244376..ecaa1098cb 100644 --- a/gen/replicapoolupdater1_beta1/src/lib.rs +++ b/gen/replicapoolupdater1_beta1/src/lib.rs @@ -182,7 +182,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -322,6 +322,8 @@ pub struct Replicapoolupdater { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Replicapoolupdater {} @@ -334,6 +336,8 @@ impl<'a, C, A> Replicapoolupdater client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -353,6 +357,26 @@ impl<'a, C, A> Replicapoolupdater self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/replicapoolupdater/v1beta1/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1150,7 +1174,7 @@ impl<'a, C, A> RollingUpdatePauseCall<'a, C, A> where C: BorrowMut RollingUpdateRollbackCall<'a, C, A> where C: BorrowMut RollingUpdateGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReplicapoolReadonly.as_ref().to_string(), ()); } @@ -1927,7 +1951,7 @@ impl<'a, C, A> RollingUpdateResumeCall<'a, C, A> where C: BorrowMut RollingUpdateListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/rollingUpdates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReplicapoolReadonly.as_ref().to_string(), ()); } @@ -2474,7 +2498,7 @@ impl<'a, C, A> RollingUpdateInsertCall<'a, C, A> where C: BorrowMut RollingUpdateListInstanceUpdateCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ReplicapoolReadonly.as_ref().to_string(), ()); } @@ -3042,7 +3066,7 @@ impl<'a, C, A> RollingUpdateCancelCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3573,7 +3597,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/replicapoolupdater/v1beta1/projects/{project}/zones/{zone}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3769,4 +3793,3 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/reseller1_sandbox/src/lib.rs b/gen/reseller1_sandbox/src/lib.rs index 7ef97292a5..fccea60087 100644 --- a/gen/reseller1_sandbox/src/lib.rs +++ b/gen/reseller1_sandbox/src/lib.rs @@ -186,7 +186,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -320,6 +320,8 @@ pub struct Reseller { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Reseller {} @@ -332,6 +334,8 @@ impl<'a, C, A> Reseller client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/apps/reseller/v1sandbox/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -351,6 +355,26 @@ impl<'a, C, A> Reseller self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/apps/reseller/v1sandbox/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1133,7 +1157,7 @@ impl<'a, C, A> CustomerUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers/{customerId}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrder.as_ref().to_string(), ()); } @@ -1402,7 +1426,7 @@ impl<'a, C, A> CustomerInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers".to_string(); + let mut url = self.hub._base_url.clone() + "customers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrder.as_ref().to_string(), ()); } @@ -1644,7 +1668,7 @@ impl<'a, C, A> CustomerPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers/{customerId}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrder.as_ref().to_string(), ()); } @@ -1903,7 +1927,7 @@ impl<'a, C, A> CustomerGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers/{customerId}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrderReadonly.as_ref().to_string(), ()); } @@ -2150,7 +2174,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers/{customerId}/subscriptions/{subscriptionId}".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerId}/subscriptions/{subscriptionId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrderReadonly.as_ref().to_string(), ()); } @@ -2934,7 +2958,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/subscriptions".to_string(); + let mut url = self.hub._base_url.clone() + "subscriptions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrderReadonly.as_ref().to_string(), ()); } @@ -3182,7 +3206,7 @@ impl<'a, C, A> SubscriptionChangeRenewalSettingCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/apps/reseller/v1sandbox/customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings".to_string(); + let mut url = self.hub._base_url.clone() + "customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings"; if self._scopes.len() == 0 { self._scopes.insert(Scope::AppOrder.as_ref().to_string(), ()); } @@ -3453,7 +3477,7 @@ impl<'a, C, A> SubscriptionStartPaidServiceCall<'a, C, A> where C: BorrowMut SubscriptionChangeSeatCall<'a, C, A> where C: BorrowMut SubscriptionSuspendCall<'a, C, A> where C: BorrowMut SubscriptionActivateCall<'a, C, A> where C: BorrowMut SubscriptionChangePlanCall<'a, C, A> where C: BorrowMut SubscriptionChangePlanCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Resourceviews {} @@ -346,6 +348,8 @@ impl<'a, C, A> Resourceviews client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/resourceviews/v1beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -365,6 +369,26 @@ impl<'a, C, A> Resourceviews self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/resourceviews/v1beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1177,7 +1201,7 @@ impl<'a, C, A> ZoneViewRemoveResourceCall<'a, C, A> where C: BorrowMut ZoneViewAddResourceCall<'a, C, A> where C: BorrowMut ZoneViewListResourceCall<'a, C, A> where C: BorrowMut ZoneViewGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/resourceViews/{resourceView}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -2336,7 +2360,7 @@ impl<'a, C, A> ZoneViewListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/resourceViews"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -2604,7 +2628,7 @@ impl<'a, C, A> ZoneViewInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/resourceViews"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2877,7 +2901,7 @@ impl<'a, C, A> ZoneViewDeleteCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/resourceViews/{resourceView}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/resourceViews/{resourceView}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3143,7 +3167,7 @@ impl<'a, C, A> ZoneViewSetServiceCall<'a, C, A> where C: BorrowMut ZoneViewGetServiceCall<'a, C, A> where C: BorrowMut ZoneOperationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -3969,7 +3993,7 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/resourceviews/v1beta2/projects/{project}/zones/{zone}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/zones/{zone}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ComputeReadonly.as_ref().to_string(), ()); } @@ -4165,4 +4189,3 @@ impl<'a, C, A> ZoneOperationListCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/safebrowsing4/src/lib.rs b/gen/safebrowsing4/src/lib.rs index c2e9bd7f5e..c4b06d6420 100644 --- a/gen/safebrowsing4/src/lib.rs +++ b/gen/safebrowsing4/src/lib.rs @@ -182,7 +182,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -291,6 +291,8 @@ pub struct Safebrowsing { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Safebrowsing {} @@ -303,6 +305,8 @@ impl<'a, C, A> Safebrowsing client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://safebrowsing.googleapis.com/".to_string(), + _root_url: "https://safebrowsing.googleapis.com/".to_string(), } } @@ -328,6 +332,26 @@ impl<'a, C, A> Safebrowsing self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://safebrowsing.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://safebrowsing.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1087,7 +1111,7 @@ impl<'a, C, A> ThreatListListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://safebrowsing.googleapis.com/v4/threatLists".to_string(); + let mut url = self.hub._base_url.clone() + "v4/threatLists"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1280,7 +1304,7 @@ impl<'a, C, A> ThreatMatcheFindCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://safebrowsing.googleapis.com/v4/threatMatches:find".to_string(); + let mut url = self.hub._base_url.clone() + "v4/threatMatches:find"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1497,7 +1521,7 @@ impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut FullHasheFindCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://safebrowsing.googleapis.com/v4/fullHashes:find".to_string(); + let mut url = self.hub._base_url.clone() + "v4/fullHashes:find"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1857,4 +1881,3 @@ impl<'a, C, A> FullHasheFindCall<'a, C, A> where C: BorrowMut, A: } - diff --git a/gen/serviceregistryalpha/src/lib.rs b/gen/serviceregistryalpha/src/lib.rs index 4cb12ff05c..13656657e8 100644 --- a/gen/serviceregistryalpha/src/lib.rs +++ b/gen/serviceregistryalpha/src/lib.rs @@ -181,7 +181,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -322,6 +322,8 @@ pub struct ServiceRegistry { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for ServiceRegistry {} @@ -334,6 +336,8 @@ impl<'a, C, A> ServiceRegistry client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/serviceregistry/alpha/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -353,6 +357,26 @@ impl<'a, C, A> ServiceRegistry self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/serviceregistry/alpha/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -932,7 +956,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -1197,7 +1221,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/operations".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::NdevCloudmanReadonly.as_ref().to_string(), ()); } @@ -1479,7 +1503,7 @@ impl<'a, C, A> EndpointInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1740,7 +1764,7 @@ impl<'a, C, A> EndpointDeleteCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints/{endpoint}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints/{endpoint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -1994,7 +2018,7 @@ impl<'a, C, A> EndpointUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints/{endpoint}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints/{endpoint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2272,7 +2296,7 @@ impl<'a, C, A> EndpointPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints/{endpoint}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints/{endpoint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2561,7 +2585,7 @@ impl<'a, C, A> EndpointListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2838,7 +2862,7 @@ impl<'a, C, A> EndpointGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/serviceregistry/alpha/projects/{project}/global/endpoints/{endpoint}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/global/endpoints/{endpoint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3013,4 +3037,3 @@ impl<'a, C, A> EndpointGetCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/siteverification1/src/lib.rs b/gen/siteverification1/src/lib.rs index 016552d246..7360659cee 100644 --- a/gen/siteverification1/src/lib.rs +++ b/gen/siteverification1/src/lib.rs @@ -179,7 +179,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -314,6 +314,8 @@ pub struct SiteVerification { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for SiteVerification {} @@ -326,6 +328,8 @@ impl<'a, C, A> SiteVerification client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/siteVerification/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -342,6 +346,26 @@ impl<'a, C, A> SiteVerification self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/siteVerification/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -709,7 +733,7 @@ impl<'a, C, A> WebResourceGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "webResource/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -951,7 +975,7 @@ impl<'a, C, A> WebResourcePatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "webResource/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1208,7 +1232,7 @@ impl<'a, C, A> WebResourceListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource".to_string(); + let mut url = self.hub._base_url.clone() + "webResource"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1411,7 +1435,7 @@ impl<'a, C, A> WebResourceDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "webResource/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1641,7 +1665,7 @@ impl<'a, C, A> WebResourceGetTokenCall<'a, C, A> where C: BorrowMut WebResourceUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "webResource/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2142,7 +2166,7 @@ impl<'a, C, A> WebResourceInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/siteVerification/v1/webResource".to_string(); + let mut url = self.hub._base_url.clone() + "webResource"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2310,4 +2334,3 @@ impl<'a, C, A> WebResourceInsertCall<'a, C, A> where C: BorrowMut } - diff --git a/gen/slides1/src/lib.rs b/gen/slides1/src/lib.rs index e8aa7d38be..ed42158b9f 100644 --- a/gen/slides1/src/lib.rs +++ b/gen/slides1/src/lib.rs @@ -179,7 +179,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -330,6 +330,8 @@ pub struct Slides { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Slides {} @@ -342,6 +344,8 @@ impl<'a, C, A> Slides client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://slides.googleapis.com/".to_string(), + _root_url: "https://slides.googleapis.com/".to_string(), } } @@ -358,6 +362,26 @@ impl<'a, C, A> Slides self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://slides.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://slides.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -3284,7 +3308,7 @@ impl<'a, C, A> PresentationCreateCall<'a, C, A> where C: BorrowMut PresentationGetCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://slides.googleapis.com/v1/presentations/{+presentationId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/presentations/{+presentationId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::DriveReadonly.as_ref().to_string(), ()); } @@ -3790,7 +3814,7 @@ impl<'a, C, A> PresentationBatchUpdateCall<'a, C, A> where C: BorrowMut PresentationPageGetCall<'a, C, A> where C: BorrowMut PresentationPageGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Spectrum {} @@ -297,6 +299,8 @@ impl<'a, C, A> Spectrum client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/spectrum/v1explorer/paws/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -313,6 +317,26 @@ impl<'a, C, A> Spectrum self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/spectrum/v1explorer/paws/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1381,7 +1405,7 @@ impl<'a, C, A> PawNotifySpectrumUseCall<'a, C, A> where C: BorrowMut PawRegisterCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/spectrum/v1explorer/paws/register".to_string(); + let mut url = self.hub._base_url.clone() + "register"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1803,7 +1827,7 @@ impl<'a, C, A> PawGetSpectrumCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/spectrum/v1explorer/paws/getSpectrum".to_string(); + let mut url = self.hub._base_url.clone() + "getSpectrum"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2014,7 +2038,7 @@ impl<'a, C, A> PawInitCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/spectrum/v1explorer/paws/init".to_string(); + let mut url = self.hub._base_url.clone() + "init"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2225,7 +2249,7 @@ impl<'a, C, A> PawGetSpectrumBatchCall<'a, C, A> where C: BorrowMut PawVerifyDeviceCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/spectrum/v1explorer/paws/verifyDevice".to_string(); + let mut url = self.hub._base_url.clone() + "verifyDevice"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -2573,4 +2597,3 @@ impl<'a, C, A> PawVerifyDeviceCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/sqladmin1_beta4/src/lib.rs b/gen/sqladmin1_beta4/src/lib.rs index a7db22431d..81c0d5c246 100644 --- a/gen/sqladmin1_beta4/src/lib.rs +++ b/gen/sqladmin1_beta4/src/lib.rs @@ -216,7 +216,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -351,6 +351,8 @@ pub struct SQLAdmin { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for SQLAdmin {} @@ -363,6 +365,8 @@ impl<'a, C, A> SQLAdmin client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/sql/v1beta4/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -400,6 +404,26 @@ impl<'a, C, A> SQLAdmin self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/sql/v1beta4/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2896,7 +2920,7 @@ impl<'a, C, A> OperationListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/operations".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/operations"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3157,7 +3181,7 @@ impl<'a, C, A> OperationGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/operations/{operation}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/operations/{operation}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3402,7 +3426,7 @@ impl<'a, C, A> TierListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/tiers".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/tiers"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3639,7 +3663,7 @@ impl<'a, C, A> UserListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/users".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3890,7 +3914,7 @@ impl<'a, C, A> UserDeleteCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/users".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4168,7 +4192,7 @@ impl<'a, C, A> UserUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/users".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4466,7 +4490,7 @@ impl<'a, C, A> UserInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/users".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/users"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4739,7 +4763,7 @@ impl<'a, C, A> InstanceTruncateLogCall<'a, C, A> where C: BorrowMut InstanceFailoverCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/failover".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/failover"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5274,7 +5298,7 @@ impl<'a, C, A> InstanceResetSslConfigCall<'a, C, A> where C: BorrowMut InstancePromoteReplicaCall<'a, C, A> where C: BorrowMut InstanceGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6022,7 +6046,7 @@ impl<'a, C, A> InstancePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6300,7 +6324,7 @@ impl<'a, C, A> InstanceCloneCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/clone".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/clone"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6571,7 +6595,7 @@ impl<'a, C, A> InstanceDeleteCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6818,7 +6842,7 @@ impl<'a, C, A> InstanceStopReplicaCall<'a, C, A> where C: BorrowMut InstanceStartReplicaCall<'a, C, A> where C: BorrowMut InstanceInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7586,7 +7610,7 @@ impl<'a, C, A> InstanceListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7844,7 +7868,7 @@ impl<'a, C, A> InstanceImportCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/import".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/import"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8122,7 +8146,7 @@ impl<'a, C, A> InstanceUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8393,7 +8417,7 @@ impl<'a, C, A> InstanceRestartCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/restart".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/restart"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8647,7 +8671,7 @@ impl<'a, C, A> InstanceExportCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/export".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/export"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8925,7 +8949,7 @@ impl<'a, C, A> InstanceRestoreBackupCall<'a, C, A> where C: BorrowMut FlagListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/flags".to_string(); + let mut url = self.hub._base_url.clone() + "flags"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9400,7 +9424,7 @@ impl<'a, C, A> DatabaseDeleteCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases/{database}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9666,7 +9690,7 @@ impl<'a, C, A> DatabasePatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases/{database}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9947,7 +9971,7 @@ impl<'a, C, A> DatabaseListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10201,7 +10225,7 @@ impl<'a, C, A> DatabaseInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10474,7 +10498,7 @@ impl<'a, C, A> DatabaseGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases/{database}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -10740,7 +10764,7 @@ impl<'a, C, A> DatabaseUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/databases/{database}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11028,7 +11052,7 @@ impl<'a, C, A> SslCertInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/sslCerts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11301,7 +11325,7 @@ impl<'a, C, A> SslCertDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11560,7 +11584,7 @@ impl<'a, C, A> SslCertGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11824,7 +11848,7 @@ impl<'a, C, A> SslCertCreateEphemeralCall<'a, C, A> where C: BorrowMut SslCertListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/sslCerts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12352,7 +12376,7 @@ impl<'a, C, A> BackupRunListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/backupRuns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12615,7 +12639,7 @@ impl<'a, C, A> BackupRunGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/backupRuns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12874,7 +12898,7 @@ impl<'a, C, A> BackupRunDeleteCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/backupRuns/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13138,7 +13162,7 @@ impl<'a, C, A> BackupRunInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns".to_string(); + let mut url = self.hub._base_url.clone() + "projects/{project}/instances/{instance}/backupRuns"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -13337,4 +13361,3 @@ impl<'a, C, A> BackupRunInsertCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/storage1/src/lib.rs b/gen/storage1/src/lib.rs index f9f9da419f..cb22e730cd 100644 --- a/gen/storage1/src/lib.rs +++ b/gen/storage1/src/lib.rs @@ -225,7 +225,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -385,6 +385,8 @@ pub struct Storage { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Storage {} @@ -397,6 +399,8 @@ impl<'a, C, A> Storage client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/storage/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -428,6 +432,26 @@ impl<'a, C, A> Storage self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/storage/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2299,7 +2323,7 @@ impl<'a, C, A> DefaultObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/defaultObjectAcl"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2567,7 +2591,7 @@ impl<'a, C, A> DefaultObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/defaultObjectAcl/{entity}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -2846,7 +2870,7 @@ impl<'a, C, A> DefaultObjectAccessControlListCall<'a, C, A> where C: BorrowMut DefaultObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/defaultObjectAcl/{entity}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3374,7 +3398,7 @@ impl<'a, C, A> DefaultObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/defaultObjectAcl/{entity}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/defaultObjectAcl/{entity}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3611,7 +3635,7 @@ impl<'a, C, A> DefaultObjectAccessControlGetCall<'a, C, A> where C: BorrowMut BucketAccessControlPatchCall<'a, C, A> where C: BorrowMut BucketAccessControlDeleteCall<'a, C, A> where C: BorrowMut BucketAccessControlInsertCall<'a, C, A> where C: BorrowMut BucketAccessControlGetCall<'a, C, A> where C: BorrowMut BucketAccessControlUpdateCall<'a, C, A> where C: BorrowMut BucketAccessControlListCall<'a, C, A> where C: BorrowMut ChannelStopCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/storage/v1/channels/stop".to_string(); + let mut url = self.hub._base_url.clone() + "channels/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -5696,7 +5720,7 @@ impl<'a, C, A> ObjectRewriteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6129,7 +6153,7 @@ impl<'a, C, A> ObjectGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o/{object}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6481,7 +6505,7 @@ impl<'a, C, A> ObjectUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o/{object}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -6836,7 +6860,7 @@ impl<'a, C, A> ObjectWatchAllCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/watch".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o/watch"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7209,9 +7233,9 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/storage/v1/b/{bucket}/o".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/storage/v1/b/{bucket}/o", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/storage/v1/b/{bucket}/o".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/storage/v1/b/{bucket}/o", "resumable") } else { unreachable!() }; @@ -7675,7 +7699,7 @@ impl<'a, C, A> ObjectComposeCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/storage/v1/b/{destinationBucket}/o/{destinationObject}/compose".to_string(); + let mut url = self.hub._base_url.clone() + "b/{destinationBucket}/o/{destinationObject}/compose"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -7991,7 +8015,7 @@ impl<'a, C, A> ObjectDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o/{object}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8291,7 +8315,7 @@ impl<'a, C, A> ObjectListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -8657,7 +8681,7 @@ impl<'a, C, A> ObjectCopyCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/storage/v1/b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9067,7 +9091,7 @@ impl<'a, C, A> ObjectPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}/o/{object}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}/o/{object}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -9399,7 +9423,7 @@ impl<'a, C, A> ObjectAccessControlInsertCall<'a, C, A> where C: BorrowMut ObjectAccessControlPatchCall<'a, C, A> where C: BorrowMut ObjectAccessControlListCall<'a, C, A> where C: BorrowMut ObjectAccessControlDeleteCall<'a, C, A> where C: BorrowMut ObjectAccessControlGetCall<'a, C, A> where C: BorrowMut ObjectAccessControlUpdateCall<'a, C, A> where C: BorrowMut BucketUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11410,7 +11434,7 @@ impl<'a, C, A> BucketGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11675,7 +11699,7 @@ impl<'a, C, A> BucketDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -11936,7 +11960,7 @@ impl<'a, C, A> BucketInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b".to_string(); + let mut url = self.hub._base_url.clone() + "b"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12227,7 +12251,7 @@ impl<'a, C, A> BucketPatchCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b/{bucket}".to_string(); + let mut url = self.hub._base_url.clone() + "b/{bucket}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12541,7 +12565,7 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/storage/v1/b".to_string(); + let mut url = self.hub._base_url.clone() + "b"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -12713,4 +12737,3 @@ impl<'a, C, A> BucketListCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/storagetransfer1/src/lib.rs b/gen/storagetransfer1/src/lib.rs index c39d48e1fa..e499eca76f 100644 --- a/gen/storagetransfer1/src/lib.rs +++ b/gen/storagetransfer1/src/lib.rs @@ -185,7 +185,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -313,6 +313,8 @@ pub struct Storagetransfer { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Storagetransfer {} @@ -325,6 +327,8 @@ impl<'a, C, A> Storagetransfer client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://storagetransfer.googleapis.com/".to_string(), + _root_url: "https://storagetransfer.googleapis.com/".to_string(), } } @@ -350,6 +354,26 @@ impl<'a, C, A> Storagetransfer self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://storagetransfer.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://storagetransfer.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1371,7 +1395,7 @@ impl<'a, C, A> TransferOperationPauseCall<'a, C, A> where C: BorrowMut TransferOperationResumeCall<'a, C, A> where C: BorrowMut TransferOperationGetCall<'a, C, A> where C: BorrowMut TransferOperationDeleteCall<'a, C, A> where C: BorrowMut TransferOperationListCall<'a, C, A> where C: BorrowMut TransferOperationCancelCall<'a, C, A> where C: BorrowMut GoogleServiceAccountGetCall<'a, C, A> where C: BorrowMut TransferJobListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://storagetransfer.googleapis.com/v1/transferJobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1/transferJobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3424,7 +3448,7 @@ impl<'a, C, A> TransferJobPatchCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://storagetransfer.googleapis.com/v1/{+jobName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+jobName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3697,7 +3721,7 @@ impl<'a, C, A> TransferJobCreateCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://storagetransfer.googleapis.com/v1/transferJobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1/transferJobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -3937,7 +3961,7 @@ impl<'a, C, A> TransferJobGetCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://storagetransfer.googleapis.com/v1/{+jobName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/{+jobName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ()); } @@ -4191,7 +4215,7 @@ impl<'a, C, A> MethodGetGoogleServiceAccountCall<'a, C, A> where C: BorrowMut MethodGetGoogleServiceAccountCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Surveys {} @@ -332,6 +334,8 @@ impl<'a, C, A> Surveys client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/surveys/v2/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -354,6 +358,26 @@ impl<'a, C, A> Surveys self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/surveys/v2/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1225,7 +1249,7 @@ impl<'a, C, A> SurveyStopCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{resourceId}/stop".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{resourceId}/stop"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1464,7 +1488,7 @@ impl<'a, C, A> SurveyInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys".to_string(); + let mut url = self.hub._base_url.clone() + "surveys"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1692,7 +1716,7 @@ impl<'a, C, A> SurveyDeleteCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{surveyUrlId}".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{surveyUrlId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1940,7 +1964,7 @@ impl<'a, C, A> SurveyListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys".to_string(); + let mut url = self.hub._base_url.clone() + "surveys"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2169,7 +2193,7 @@ impl<'a, C, A> SurveyUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{surveyUrlId}".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{surveyUrlId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2435,7 +2459,7 @@ impl<'a, C, A> SurveyStartCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{resourceId}/start".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{resourceId}/start"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2693,7 +2717,7 @@ impl<'a, C, A> SurveyGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{surveyUrlId}".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{surveyUrlId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2956,7 +2980,7 @@ impl<'a, C, A> ResultGetCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); } - let mut url = "https://www.googleapis.com/surveys/v2/surveys/{surveyUrlId}/results".to_string(); + let mut url = self.hub._base_url.clone() + "surveys/{surveyUrlId}/results"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3228,7 +3252,7 @@ impl<'a, C, A> MobileapppanelListCall<'a, C, A> where C: BorrowMut MobileapppanelGetCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/surveys/v2/mobileAppPanels/{panelId}".to_string(); + let mut url = self.hub._base_url.clone() + "mobileAppPanels/{panelId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3692,7 +3716,7 @@ impl<'a, C, A> MobileapppanelUpdateCall<'a, C, A> where C: BorrowMut MobileapppanelUpdateCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for TagManager {} @@ -398,6 +400,8 @@ impl<'a, C, A> TagManager client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/tagmanager/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -414,6 +418,26 @@ impl<'a, C, A> TagManager self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/tagmanager/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -2554,7 +2578,7 @@ impl<'a, C, A> AccountContainerListCall<'a, C, A> where C: BorrowMut AccountPermissionListCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentCreateCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/environments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainer.as_ref().to_string(), ()); } @@ -3309,7 +3333,7 @@ impl<'a, C, A> AccountPermissionCreateCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentDeleteCall<'a, C, A> where C: BorrowMu } - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/environments/{environmentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainer.as_ref().to_string(), ()); } @@ -3817,7 +3841,7 @@ impl<'a, C, A> AccountPermissionDeleteCall<'a, C, A> where C: BorrowMut AccountContainerGetCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentPatchCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/environments/{environmentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainer.as_ref().to_string(), ()); } @@ -4613,7 +4637,7 @@ impl<'a, C, A> AccountContainerVersionListCall<'a, C, A> where C: BorrowMut AccountContainerTriggerUpdateCall<'a, C, A> where C: BorrowMut AccountContainerTriggerGetCall<'a, C, A> where C: BorrowMut AccountContainerDeleteCall<'a, C, A> where C: BorrowMut AccountContainerFolderDeleteCall<'a, C, A> where C: BorrowMut AccountContainerCreateCall<'a, C, A> where C: BorrowMut AccountContainerTagDeleteCall<'a, C, A> where C: BorrowMut AccountContainerFolderEntityListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -6694,7 +6718,7 @@ impl<'a, C, A> AccountContainerVersionUndeleteCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainerversion.as_ref().to_string(), ()); } @@ -6951,7 +6975,7 @@ impl<'a, C, A> AccountContainerEnvironmentListCall<'a, C, A> where C: BorrowMut< params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/environments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -7198,7 +7222,7 @@ impl<'a, C, A> AccountContainerTagListCall<'a, C, A> where C: BorrowMut AccountContainerVersionPublishCall<'a, C, A> where C: BorrowMut AccountContainerFolderGetCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentGetCall<'a, C, A> where C: BorrowMut AccountContainerTagCreateCall<'a, C, A> where C: BorrowMut AccountContainerTriggerListCall<'a, C, A> where C: BorrowMut AccountContainerVersionDeleteCall<'a, C, A> where C: BorrowMut AccountUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ManageAccount.as_ref().to_string(), ()); } @@ -9292,7 +9316,7 @@ impl<'a, C, A> AccountContainerVersionCreateCall<'a, C, A> where C: BorrowMut AccountPermissionGetCall<'a, C, A> where C: BorrowMut AccountContainerMoveFolderUpdateCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/move_folders/{folderId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainer.as_ref().to_string(), ()); } @@ -10136,7 +10160,7 @@ impl<'a, C, A> AccountContainerVersionRestoreCall<'a, C, A> where C: BorrowMut AccountContainerVariableCreateCall<'a, C, A> where C: BorrowMut AccountContainerVariableListCall<'a, C, A> where C: BorrowMut AccountContainerTagGetCall<'a, C, A> where C: BorrowMut AccountContainerVariableGetCall<'a, C, A> where C: BorrowMut AccountContainerTriggerDeleteCall<'a, C, A> where C: BorrowMut AccountContainerTriggerCreateCall<'a, C, A> where C: BorrowMut AccountContainerFolderUpdateCall<'a, C, A> where C: BorrowMut AccountListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts".to_string(); + let mut url = self.hub._base_url.clone() + "accounts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -12473,7 +12497,7 @@ impl<'a, C, A> AccountPermissionUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVariableDeleteCall<'a, C, A> where C: BorrowMut AccountContainerReauthorizeEnvironmentUpdateCall<'a, C, A> where params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Publish.as_ref().to_string(), ()); } @@ -13280,7 +13304,7 @@ impl<'a, C, A> AccountGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -13529,7 +13553,7 @@ impl<'a, C, A> AccountContainerUpdateCall<'a, C, A> where C: BorrowMut AccountContainerTagUpdateCall<'a, C, A> where C: BorrowMut AccountContainerEnvironmentUpdateCall<'a, C, A> where C: BorrowMu params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}".to_string(); + let mut url = self.hub._base_url.clone() + "accounts/{accountId}/containers/{containerId}/environments/{environmentId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::EditContainer.as_ref().to_string(), ()); } @@ -14418,7 +14442,7 @@ impl<'a, C, A> AccountContainerFolderCreateCall<'a, C, A> where C: BorrowMut AccountContainerFolderListCall<'a, C, A> where C: BorrowMut AccountContainerVersionUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVariableUpdateCall<'a, C, A> where C: BorrowMut AccountContainerVersionGetCall<'a, C, A> where C: BorrowMut AccountContainerVersionGetCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Taskqueue {} @@ -323,6 +325,8 @@ impl<'a, C, A> Taskqueue client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/taskqueue/v1beta2/projects/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -342,6 +346,26 @@ impl<'a, C, A> Taskqueue self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/taskqueue/v1beta2/projects/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -852,7 +876,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1120,7 +1144,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/lease".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/lease"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1408,7 +1432,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1680,7 +1704,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1938,7 +1962,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2227,7 +2251,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2476,7 +2500,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2744,7 +2768,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/taskqueue/v1beta2/projects/{project}/taskqueues/{taskqueue}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "{project}/taskqueues/{taskqueue}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2961,4 +2985,3 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa } - diff --git a/gen/tasks1/src/lib.rs b/gen/tasks1/src/lib.rs index 62d08226c1..ead7c6ebd9 100644 --- a/gen/tasks1/src/lib.rs +++ b/gen/tasks1/src/lib.rs @@ -189,7 +189,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -328,6 +328,8 @@ pub struct TasksHub { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for TasksHub {} @@ -340,6 +342,8 @@ impl<'a, C, A> TasksHub client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/tasks/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -359,6 +363,26 @@ impl<'a, C, A> TasksHub self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/tasks/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1006,7 +1030,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -1320,7 +1344,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1598,7 +1622,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1866,7 +1890,7 @@ impl<'a, C, A> TaskClearCall<'a, C, A> where C: BorrowMut, A: oau } - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/clear".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/clear"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2103,7 +2127,7 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks/{task}/move".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks/{task}/move"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2363,7 +2387,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2600,7 +2624,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks/{task}".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks/{task}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2862,7 +2886,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/lists/{tasklist}/tasks".to_string(); + let mut url = self.hub._base_url.clone() + "lists/{tasklist}/tasks"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3143,7 +3167,7 @@ impl<'a, C, A> TasklistListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -3368,7 +3392,7 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists/{tasklist}".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists/{tasklist}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3626,7 +3650,7 @@ impl<'a, C, A> TasklistDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists/{tasklist}".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists/{tasklist}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3858,7 +3882,7 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists/{tasklist}".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists/{tasklist}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4122,7 +4146,7 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4350,7 +4374,7 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/tasks/v1/users/@me/lists/{tasklist}".to_string(); + let mut url = self.hub._base_url.clone() + "users/@me/lists/{tasklist}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -4515,4 +4539,3 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/translate2/src/lib.rs b/gen/translate2/src/lib.rs index 238a1cbef5..cb4a4205a5 100644 --- a/gen/translate2/src/lib.rs +++ b/gen/translate2/src/lib.rs @@ -174,7 +174,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -277,6 +277,8 @@ pub struct Translate { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Translate {} @@ -289,6 +291,8 @@ impl<'a, C, A> Translate client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/language/translate/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -311,6 +315,26 @@ impl<'a, C, A> Translate self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/language/translate/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -697,7 +721,7 @@ impl<'a, C, A> LanguageListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/language/translate/v2/languages".to_string(); + let mut url = self.hub._base_url.clone() + "v2/languages"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -890,7 +914,7 @@ impl<'a, C, A> DetectionListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/language/translate/v2/detect".to_string(); + let mut url = self.hub._base_url.clone() + "v2/detect"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1106,7 +1130,7 @@ impl<'a, C, A> TranslationListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/language/translate/v2".to_string(); + let mut url = self.hub._base_url.clone() + "v2"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -1262,4 +1286,3 @@ impl<'a, C, A> TranslationListCall<'a, C, A> where C: BorrowMut, } - diff --git a/gen/urlshortener1/src/lib.rs b/gen/urlshortener1/src/lib.rs index 5849b21886..ca9ea11ee8 100644 --- a/gen/urlshortener1/src/lib.rs +++ b/gen/urlshortener1/src/lib.rs @@ -172,7 +172,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -298,6 +298,8 @@ pub struct Urlshortener { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Urlshortener {} @@ -310,6 +312,8 @@ impl<'a, C, A> Urlshortener client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/urlshortener/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -326,6 +330,26 @@ impl<'a, C, A> Urlshortener self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/urlshortener/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -631,7 +655,7 @@ impl<'a, C, A> UrlInsertCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/urlshortener/v1/url".to_string(); + let mut url = self.hub._base_url.clone() + "url"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -864,7 +888,7 @@ impl<'a, C, A> UrlGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/urlshortener/v1/url".to_string(); + let mut url = self.hub._base_url.clone() + "url"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1093,7 +1117,7 @@ impl<'a, C, A> UrlListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/urlshortener/v1/url/history".to_string(); + let mut url = self.hub._base_url.clone() + "url/history"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1241,4 +1265,3 @@ impl<'a, C, A> UrlListCall<'a, C, A> where C: BorrowMut, A: oauth } - diff --git a/gen/webfonts1/src/lib.rs b/gen/webfonts1/src/lib.rs index 0026f20599..c802978c4f 100644 --- a/gen/webfonts1/src/lib.rs +++ b/gen/webfonts1/src/lib.rs @@ -171,7 +171,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -275,6 +275,8 @@ pub struct Webfonts { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Webfonts {} @@ -287,6 +289,8 @@ impl<'a, C, A> Webfonts client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/webfonts/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -303,6 +307,26 @@ impl<'a, C, A> Webfonts self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/webfonts/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -498,7 +522,7 @@ impl<'a, C, A> WebfontListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/webfonts/v1/webfonts".to_string(); + let mut url = self.hub._base_url.clone() + "webfonts"; let mut key = self.hub.auth.borrow_mut().api_key(); if key.is_none() { @@ -618,4 +642,3 @@ impl<'a, C, A> WebfontListCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/webmasters3/src/lib.rs b/gen/webmasters3/src/lib.rs index 903033a7dd..cb7c25067b 100644 --- a/gen/webmasters3/src/lib.rs +++ b/gen/webmasters3/src/lib.rs @@ -178,7 +178,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -307,6 +307,8 @@ pub struct Webmasters { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for Webmasters {} @@ -319,6 +321,8 @@ impl<'a, C, A> Webmasters client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/webmasters/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -347,6 +351,26 @@ impl<'a, C, A> Webmasters self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/webmasters/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -1237,7 +1261,7 @@ impl<'a, C, A> SitemapDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}/sitemaps/{feedpath}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1473,7 +1497,7 @@ impl<'a, C, A> SitemapSubmitCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}/sitemaps/{feedpath}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -1710,7 +1734,7 @@ impl<'a, C, A> SitemapGetCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}/sitemaps/{feedpath}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -1960,7 +1984,7 @@ impl<'a, C, A> SitemapListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/sitemaps".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}/sitemaps"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2202,7 +2226,7 @@ impl<'a, C, A> SiteGetCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2436,7 +2460,7 @@ impl<'a, C, A> SiteAddCall<'a, C, A> where C: BorrowMut, A: oauth } - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -2659,7 +2683,7 @@ impl<'a, C, A> SiteListCall<'a, C, A> where C: BorrowMut, A: oaut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/webmasters/v3/sites".to_string(); + let mut url = self.hub._base_url.clone() + "sites"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -2862,7 +2886,7 @@ impl<'a, C, A> SiteDeleteCall<'a, C, A> where C: BorrowMut, A: oa } - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -3096,7 +3120,7 @@ impl<'a, C, A> SearchanalyticQueryCall<'a, C, A> where C: BorrowMut UrlcrawlerrorscountQueryCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleGetCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleListCall<'a, C, A> where C: BorrowMut UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> where C: BorrowMut< } - let mut url = "https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/urlCrawlErrorsSamples/{url}".to_string(); + let mut url = self.hub._base_url.clone() + "sites/{siteUrl}/urlCrawlErrorsSamples/{url}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -4346,4 +4370,3 @@ impl<'a, C, A> UrlcrawlerrorssampleMarkAsFixedCall<'a, C, A> where C: BorrowMut< } - diff --git a/gen/youtube3/src/lib.rs b/gen/youtube3/src/lib.rs index 00bb16ef45..8978b64511 100644 --- a/gen/youtube3/src/lib.rs +++ b/gen/youtube3/src/lib.rs @@ -255,7 +255,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -412,6 +412,8 @@ pub struct YouTube { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for YouTube {} @@ -424,6 +426,8 @@ impl<'a, C, A> YouTube client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/youtube/v3/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -515,6 +519,26 @@ impl<'a, C, A> YouTube self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/youtube/v3/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -8574,7 +8598,7 @@ impl<'a, C, A> ChannelSectionListCall<'a, C, A> where C: BorrowMut ChannelSectionInsertCall<'a, C, A> where C: BorrowMut ChannelSectionDeleteCall<'a, C, A> where C: BorrowMut ChannelSectionUpdateCall<'a, C, A> where C: BorrowMut PlaylistInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/playlists".to_string(); + let mut url = self.hub._base_url.clone() + "playlists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -9975,7 +9999,7 @@ impl<'a, C, A> PlaylistListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/playlists".to_string(); + let mut url = self.hub._base_url.clone() + "playlists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -10257,7 +10281,7 @@ impl<'a, C, A> PlaylistDeleteCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/youtube/v3/playlists".to_string(); + let mut url = self.hub._base_url.clone() + "playlists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10485,7 +10509,7 @@ impl<'a, C, A> PlaylistUpdateCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/playlists".to_string(); + let mut url = self.hub._base_url.clone() + "playlists"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -10746,7 +10770,7 @@ impl<'a, C, A> VideoReportAbuseCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/youtube/v3/videos/reportAbuse".to_string(); + let mut url = self.hub._base_url.clone() + "videos/reportAbuse"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11033,7 +11057,7 @@ impl<'a, C, A> VideoListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/videos".to_string(); + let mut url = self.hub._base_url.clone() + "videos"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -11342,7 +11366,7 @@ impl<'a, C, A> VideoRateCall<'a, C, A> where C: BorrowMut, A: oau } - let mut url = "https://www.googleapis.com/youtube/v3/videos/rate".to_string(); + let mut url = self.hub._base_url.clone() + "videos/rate"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11561,7 +11585,7 @@ impl<'a, C, A> VideoGetRatingCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/videos/getRating".to_string(); + let mut url = self.hub._base_url.clone() + "videos/getRating"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -11788,7 +11812,7 @@ impl<'a, C, A> VideoDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/youtube/v3/videos".to_string(); + let mut url = self.hub._base_url.clone() + "videos"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12016,7 +12040,7 @@ impl<'a, C, A> VideoUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/videos".to_string(); + let mut url = self.hub._base_url.clone() + "videos"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -12309,9 +12333,9 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/youtube/v3/videos".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/youtube/v3/videos", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/youtube/v3/videos".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/videos", "resumable") } else { unreachable!() }; @@ -12743,7 +12767,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/activities".to_string(); + let mut url = self.hub._base_url.clone() + "activities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -13027,7 +13051,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/activities".to_string(); + let mut url = self.hub._base_url.clone() + "activities"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13308,7 +13332,7 @@ impl<'a, C, A> LiveStreamUpdateCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveStreams".to_string(); + let mut url = self.hub._base_url.clone() + "liveStreams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13596,7 +13620,7 @@ impl<'a, C, A> LiveStreamDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/youtube/v3/liveStreams".to_string(); + let mut url = self.hub._base_url.clone() + "liveStreams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -13867,7 +13891,7 @@ impl<'a, C, A> LiveStreamListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveStreams".to_string(); + let mut url = self.hub._base_url.clone() + "liveStreams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -14176,7 +14200,7 @@ impl<'a, C, A> LiveStreamInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveStreams".to_string(); + let mut url = self.hub._base_url.clone() + "liveStreams"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14468,7 +14492,7 @@ impl<'a, C, A> ChannelUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/channels".to_string(); + let mut url = self.hub._base_url.clone() + "channels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -14770,7 +14794,7 @@ impl<'a, C, A> ChannelListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/channels".to_string(); + let mut url = self.hub._base_url.clone() + "channels"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -15075,9 +15099,9 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/youtube/v3/watermarks/set".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/youtube/v3/watermarks/set", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/youtube/v3/watermarks/set".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/watermarks/set", "resumable") } else { unreachable!() }; @@ -15426,7 +15450,7 @@ impl<'a, C, A> WatermarkUnsetCall<'a, C, A> where C: BorrowMut, A } - let mut url = "https://www.googleapis.com/youtube/v3/watermarks/unset".to_string(); + let mut url = self.hub._base_url.clone() + "watermarks/unset"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -15649,7 +15673,7 @@ impl<'a, C, A> LiveChatModeratorInsertCall<'a, C, A> where C: BorrowMut LiveChatModeratorListCall<'a, C, A> where C: BorrowMut LiveChatModeratorDeleteCall<'a, C, A> where C: BorrowMut CaptionDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/youtube/v3/captions".to_string(); + let mut url = self.hub._base_url.clone() + "captions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -16621,9 +16645,9 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/youtube/v3/captions".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/youtube/v3/captions", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/youtube/v3/captions".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/captions", "resumable") } else { unreachable!() }; @@ -17028,7 +17052,7 @@ impl<'a, C, A> CaptionListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/captions".to_string(); + let mut url = self.hub._base_url.clone() + "captions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -17302,7 +17326,7 @@ impl<'a, C, A> CaptionDownloadCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/youtube/v3/captions/{id}".to_string(); + let mut url = self.hub._base_url.clone() + "captions/{id}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -17586,9 +17610,9 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/youtube/v3/captions".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/youtube/v3/captions", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/youtube/v3/captions".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/captions", "resumable") } else { unreachable!() }; @@ -17967,7 +17991,7 @@ impl<'a, C, A> I18nLanguageListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/i18nLanguages".to_string(); + let mut url = self.hub._base_url.clone() + "i18nLanguages"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -18203,7 +18227,7 @@ impl<'a, C, A> GuideCategoryListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/guideCategories".to_string(); + let mut url = self.hub._base_url.clone() + "guideCategories"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -18488,7 +18512,7 @@ impl<'a, C, A> CommentThreadListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/commentThreads".to_string(); + let mut url = self.hub._base_url.clone() + "commentThreads"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -18792,7 +18816,7 @@ impl<'a, C, A> CommentThreadUpdateCall<'a, C, A> where C: BorrowMut CommentThreadInsertCall<'a, C, A> where C: BorrowMut CommentInsertCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/comments".to_string(); + let mut url = self.hub._base_url.clone() + "comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -19541,7 +19565,7 @@ impl<'a, C, A> CommentSetModerationStatuCall<'a, C, A> where C: BorrowMut CommentDeleteCall<'a, C, A> where C: BorrowMut, A: } - let mut url = "https://www.googleapis.com/youtube/v3/comments".to_string(); + let mut url = self.hub._base_url.clone() + "comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -19992,7 +20016,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/comments".to_string(); + let mut url = self.hub._base_url.clone() + "comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -20257,7 +20281,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/comments".to_string(); + let mut url = self.hub._base_url.clone() + "comments"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -20497,7 +20521,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/youtube/v3/comments/markAsSpam".to_string(); + let mut url = self.hub._base_url.clone() + "comments/markAsSpam"; if self._scopes.len() == 0 { self._scopes.insert(Scope::ForceSsl.as_ref().to_string(), ()); } @@ -20716,7 +20740,7 @@ impl<'a, C, A> PlaylistItemInsertCall<'a, C, A> where C: BorrowMut PlaylistItemDeleteCall<'a, C, A> where C: BorrowMut PlaylistItemListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/playlistItems".to_string(); + let mut url = self.hub._base_url.clone() + "playlistItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -21488,7 +21512,7 @@ impl<'a, C, A> PlaylistItemUpdateCall<'a, C, A> where C: BorrowMut LiveChatMessageListCall<'a, C, A> where C: BorrowMut LiveChatMessageDeleteCall<'a, C, A> where C: BorrowMut LiveChatMessageInsertCall<'a, C, A> where C: BorrowMut VideoCategoryListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/videoCategories".to_string(); + let mut url = self.hub._base_url.clone() + "videoCategories"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -22745,7 +22769,7 @@ impl<'a, C, A> I18nRegionListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/i18nRegions".to_string(); + let mut url = self.hub._base_url.clone() + "i18nRegions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -22976,7 +23000,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut SubscriptionDeleteCall<'a, C, A> where C: BorrowMut SubscriptionListCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/subscriptions".to_string(); + let mut url = self.hub._base_url.clone() + "subscriptions"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -23784,7 +23808,7 @@ impl<'a, C, A> LiveChatBanInsertCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveChat/bans".to_string(); + let mut url = self.hub._base_url.clone() + "liveChat/bans"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24024,7 +24048,7 @@ impl<'a, C, A> LiveChatBanDeleteCall<'a, C, A> where C: BorrowMut } - let mut url = "https://www.googleapis.com/youtube/v3/liveChat/bans".to_string(); + let mut url = self.hub._base_url.clone() + "liveChat/bans"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -24258,7 +24282,7 @@ impl<'a, C, A> SponsorListCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/sponsors".to_string(); + let mut url = self.hub._base_url.clone() + "sponsors"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -24518,7 +24542,7 @@ impl<'a, C, A> VideoAbuseReportReasonListCall<'a, C, A> where C: BorrowMut LiveBroadcastControlCall<'a, C, A> where C: BorrowMut LiveBroadcastUpdateCall<'a, C, A> where C: BorrowMut LiveBroadcastBindCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveBroadcasts/bind".to_string(); + let mut url = self.hub._base_url.clone() + "liveBroadcasts/bind"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Full.as_ref().to_string(), ()); } @@ -25713,7 +25737,7 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut LiveBroadcastListCall<'a, C, A> where C: BorrowMut params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/liveBroadcasts".to_string(); + let mut url = self.hub._base_url.clone() + "liveBroadcasts"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -26593,7 +26617,7 @@ impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut ChannelBannerInsertCall<'a, C, A> where C: BorrowMut SearchListCall<'a, C, A> where C: BorrowMut, A: oa params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/v3/search".to_string(); + let mut url = self.hub._base_url.clone() + "search"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Readonly.as_ref().to_string(), ()); } @@ -27816,9 +27840,9 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: let (mut url, upload_type) = if protocol == "simple" { - ("https://www.googleapis.com/upload/youtube/v3/thumbnails/set".to_string(), "multipart") + (self.hub._root_url.clone() + "/upload/youtube/v3/thumbnails/set", "multipart") } else if protocol == "resumable" { - ("https://www.googleapis.com/resumable/upload/youtube/v3/thumbnails/set".to_string(), "resumable") + (self.hub._root_url.clone() + "/resumable/upload/youtube/v3/thumbnails/set", "resumable") } else { unreachable!() }; @@ -28174,7 +28198,7 @@ impl<'a, C, A> FanFundingEventListCall<'a, C, A> where C: BorrowMut FanFundingEventListCall<'a, C, A> where C: BorrowMut { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for YouTubeAnalytics {} @@ -338,6 +340,8 @@ impl<'a, C, A> YouTubeAnalytics client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://www.googleapis.com/youtube/analytics/v1/".to_string(), + _root_url: "https://www.googleapis.com/".to_string(), } } @@ -360,6 +364,26 @@ impl<'a, C, A> YouTubeAnalytics self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/youtube/analytics/v1/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://www.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -965,7 +989,7 @@ impl<'a, C, A> ReportQueryCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/reports".to_string(); + let mut url = self.hub._base_url.clone() + "reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YoutubeReadonly.as_ref().to_string(), ()); } @@ -1263,7 +1287,7 @@ impl<'a, C, A> GroupItemInsertCall<'a, C, A> where C: BorrowMut, params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groupItems".to_string(); + let mut url = self.hub._base_url.clone() + "groupItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Youtube.as_ref().to_string(), ()); } @@ -1505,7 +1529,7 @@ impl<'a, C, A> GroupItemListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groupItems".to_string(); + let mut url = self.hub._base_url.clone() + "groupItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YoutubeReadonly.as_ref().to_string(), ()); } @@ -1732,7 +1756,7 @@ impl<'a, C, A> GroupItemDeleteCall<'a, C, A> where C: BorrowMut, } - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groupItems".to_string(); + let mut url = self.hub._base_url.clone() + "groupItems"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Youtube.as_ref().to_string(), ()); } @@ -1949,7 +1973,7 @@ impl<'a, C, A> GroupDeleteCall<'a, C, A> where C: BorrowMut, A: o } - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Youtube.as_ref().to_string(), ()); } @@ -2172,7 +2196,7 @@ impl<'a, C, A> GroupInsertCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Youtube.as_ref().to_string(), ()); } @@ -2427,7 +2451,7 @@ impl<'a, C, A> GroupListCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YoutubeReadonly.as_ref().to_string(), ()); } @@ -2671,7 +2695,7 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o params.push(("alt", "json".to_string())); - let mut url = "https://www.googleapis.com/youtube/analytics/v1/groups".to_string(); + let mut url = self.hub._base_url.clone() + "groups"; if self._scopes.len() == 0 { self._scopes.insert(Scope::Youtube.as_ref().to_string(), ()); } @@ -2838,4 +2862,3 @@ impl<'a, C, A> GroupUpdateCall<'a, C, A> where C: BorrowMut, A: o } - diff --git a/gen/youtubereporting1/src/lib.rs b/gen/youtubereporting1/src/lib.rs index ca0ccafebf..e379c1e5d0 100644 --- a/gen/youtubereporting1/src/lib.rs +++ b/gen/youtubereporting1/src/lib.rs @@ -189,7 +189,7 @@ // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -324,6 +324,8 @@ pub struct YouTubeReporting { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, C, A> Hub for YouTubeReporting {} @@ -336,6 +338,8 @@ impl<'a, C, A> YouTubeReporting client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "google-api-rust-client/1.0.4".to_string(), + _base_url: "https://youtubereporting.googleapis.com/".to_string(), + _root_url: "https://youtubereporting.googleapis.com/".to_string(), } } @@ -358,6 +362,26 @@ impl<'a, C, A> YouTubeReporting self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `https://youtubereporting.googleapis.com/`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `https://youtubereporting.googleapis.com/`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -935,7 +959,7 @@ impl<'a, C, A> MediaDownloadCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); } - let mut url = "https://youtubereporting.googleapis.com/v1/media/{+resourceName}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/media/{+resourceName}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -1197,7 +1221,7 @@ impl<'a, C, A> ReportTypeListCall<'a, C, A> where C: BorrowMut, A params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/reportTypes".to_string(); + let mut url = self.hub._base_url.clone() + "v1/reportTypes"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -1440,7 +1464,7 @@ impl<'a, C, A> JobDeleteCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -1695,7 +1719,7 @@ impl<'a, C, A> JobReportGetCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs/{jobId}/reports/{reportId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs/{jobId}/reports/{reportId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -1958,7 +1982,7 @@ impl<'a, C, A> JobGetCall<'a, C, A> where C: BorrowMut, A: oauth2 params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs/{jobId}".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs/{jobId}"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -2236,7 +2260,7 @@ impl<'a, C, A> JobReportListCall<'a, C, A> where C: BorrowMut, A: params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs/{jobId}/reports".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs/{jobId}/reports"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -2537,7 +2561,7 @@ impl<'a, C, A> JobListCall<'a, C, A> where C: BorrowMut, A: oauth params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -2785,7 +2809,7 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau params.push(("alt", "json".to_string())); - let mut url = "https://youtubereporting.googleapis.com/v1/jobs".to_string(); + let mut url = self.hub._base_url.clone() + "v1/jobs"; if self._scopes.len() == 0 { self._scopes.insert(Scope::YtAnalyticMonetaryReadonly.as_ref().to_string(), ()); } @@ -2956,4 +2980,3 @@ impl<'a, C, A> JobCreateCall<'a, C, A> where C: BorrowMut, A: oau } - diff --git a/src/mako/api/lib.rs.mako b/src/mako/api/lib.rs.mako index 72c60244b3..42e03436d3 100644 --- a/src/mako/api/lib.rs.mako +++ b/src/mako/api/lib.rs.mako @@ -1,6 +1,6 @@ <%namespace name="lib" file="lib/lib.mako"/>\ <%namespace name="util" file="../lib/util.mako"/>\ -<% +<% from util import (new_context, rust_comment, rust_module_doc_comment) c = new_context(schemas, resources, context.get('methods')) @@ -15,7 +15,7 @@ ${lib.docs(c)} // Unused attributes happen thanks to defined, but unused structures // We don't warn about this, as depending on the API, some data structures or facilities are never used. -// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any +// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any // unused imports in fully featured APIs. Same with unused_mut ... . #![allow(unused_imports, unused_mut, dead_code)] @@ -92,6 +92,8 @@ pub struct ${hub_type}${ht_params} { client: RefCell, auth: RefCell, _user_agent: String, + _base_url: String, + _root_url: String, } impl<'a, ${', '.join(HUB_TYPE_PARAMETERS)}> Hub for ${hub_type}${ht_params} {} @@ -104,6 +106,8 @@ impl<'a, ${', '.join(HUB_TYPE_PARAMETERS)}> ${hub_type}${ht_params} client: RefCell::new(client), auth: RefCell::new(authenticator), _user_agent: "${default_user_agent}".to_string(), + _base_url: "${baseUrl}".to_string(), + _root_url: "${rootUrl}".to_string(), } } @@ -122,6 +126,26 @@ impl<'a, ${', '.join(HUB_TYPE_PARAMETERS)}> ${hub_type}${ht_params} self._user_agent = agent_name; prev } + + /// Set the base url to use in all requests to the server. + /// It defaults to `${baseUrl}`. + /// + /// Returns the previously set base url. + pub fn base_url(&mut self, new_base_url: String) -> String { + let prev = self._base_url.clone(); + self._base_url = new_base_url; + prev + } + + /// Set the root url to use in all requests to the server. + /// It defaults to `${rootUrl}`. + /// + /// Returns the previously set root url. + pub fn root_url(&mut self, new_root_url: String) -> String { + let prev = self._root_url.clone(); + self._root_url = new_root_url; + prev + } } @@ -157,4 +181,3 @@ ${mbuild.new(resource, method, c)} % endfor ## method in methods % endfor ## resource, methods - diff --git a/src/mako/api/lib/mbuild.mako b/src/mako/api/lib/mbuild.mako index 7b388c9bc5..d131fdf1bf 100644 --- a/src/mako/api/lib/mbuild.mako +++ b/src/mako/api/lib/mbuild.mako @@ -577,7 +577,7 @@ match result { else if \ % endif protocol == "${mp.protocol}" { - ("${join_url(rootUrl, mp.path)}".to_string(), "${upload_type_map.get(mp.protocol, mp.protocol)}") + (self.hub._root_url.clone() + "${mp.path}", "${upload_type_map.get(mp.protocol, mp.protocol)}") } \ % endfor else { @@ -585,7 +585,7 @@ else { }; params.push(("uploadType", upload_type.to_string())); % else: - let mut url = "${baseUrl}${m.path}".to_string(); + let mut url = self.hub._base_url.clone() + "${m.path}"; % endif % if not default_scope: % if no_auth is UNDEFINED: